[Openfirst-cvscommit] base/config/functions wysiwyg.php,NONE,1.1
Brought to you by:
xtimg
From: <dav...@us...> - 2003-08-20 07:47:09
|
Update of /cvsroot/openfirst/base/config/functions In directory sc8-pr-cvs1:/tmp/cvs-serv6186 Added Files: wysiwyg.php Log Message: initial upload --- NEW FILE: wysiwyg.php --- <?php /* * openFIRST.base - config/functions/wysiwyg.php * * Copyright (C) 2003, * openFIRST Project * Original Author: David Di Biase<dav...@ea...> and DHTMLEditor Author: Hans-Jürgen Petrich <pe...@tr...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ // A complete function to create the Javascript command for loading of the WYSIWYG function make_wysiwyg($fieldname,$height,$width,$init){ global $basepath; ?> <SCRIPT TYPE="text/javascript" language="JavaScript1.3"> <!-- !!!! important comment this !!!! document.dhtmlEditors_home='<?php echo $basepath; ?>/config/functions/wysiwyg/'; document.writeln('<'+'SCRIPT LANGUAGE="JavaScript" src="'+document.dhtmlEditors_home+'js/lib.js">'+'<'+'/SCRIPT'+'>'); document.writeln('<SCRIPT LANGUAGE="JavaScript" src="'+document.dhtmlEditors_home+'modules/button_html.js"></SCRIPT>'); // --> </SCRIPT> <textarea id="<?php echo $fieldname; ?>" name="<?php echo $fieldname; ?>" style="width:<?php echo $height; ?>px; height:<?php echo $width; ?>px;"><?php echo $init; ?></textarea> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"> <!-- var myEditor = new dhtmlEditor; myEditor.registerApiModul(MODUL__toggleEditModeGetApiInfoArray('../images/newdoc.gif')); myEditor.make_andReplaceTextarea('<?php echo $fieldname; ?>'); //--> </SCRIPT> <? } ?> |