function render_editor() { include_once wysiwygPro_DIR . 'config.php'; include_once wysiwygPro_DIR . 'editor_class.php'; $editor = new wysiwygPro(); $editor->set_name($this->_process_name_attribute($this->get_attribute('name'))); $editor->set_code($this->get_value()); if (!($width = $this->get_attribute('width'))) { $width = RICHEDIT_DEFAULT_WIDTH; } if (!($height = $this->get_attribute('height'))) { $height = RICHEDIT_DEFAULT_HEIGHT; } if ($editor->is_ie55 || $editor->is_ie50) { echo "<script type='text/javascript' src='" . WP_WEB_DIRECTORY . "/js/LimbScriptIE.js'></script>"; $editor->addbutton('Insert Image from Repository', 'after:image', 'open_limb_image_window(##name##, this)', '##directory##/images/limb_image.gif', 22, 22, 'limb_image'); $editor->addbutton('Insert File from Repository', 'after:link', 'open_limb_file_window(##name##, this)', '##directory##/images/limb_file.gif', 22, 22, 'limb_file'); } elseif ($editor->is_gecko) { echo "<script type='text/javascript' src='" . WP_WEB_DIRECTORY . "/js/LimbScriptMozilla.js'></script>"; $editor->addbutton('Insert Image from Repository', 'after:image', 'open_limb_image_window(##name##, this)', '##directory##/images/limb_image.gif', 22, 22, 'limb_image'); $editor->addbutton('Insert File from Repository', 'after:link', 'open_limb_file_window(##name##, this)', '##directory##/images/limb_file.gif', 22, 22, 'limb_file'); } $editor->set_stylesheet('/design/main/styles/main.css'); $editor->usep(true); $editor->print_editor($width, $height); }
function editorArea($name, $content, $hiddenField, $width, $height, $col, $row) { global $mosConfig_absolute_path; $content = str_replace("<", "<", $content); $content = str_replace(">", ">", $content); $content = str_replace("&", "&", $content); $content = str_replace(" ", " ", $content); $content = str_replace(""", "\"", $content); // include the config file and editor class: include_once $mosConfig_absolute_path . '/editor/wysiwygpro/config.php'; include_once $mosConfig_absolute_path . '/editor/wysiwygpro/editor_class.php'; // create a new instance of the wysiwygPro class: $name = new wysiwygPro(); $name->set_name($hiddenField); if ($hiddenField == 'fulltext') { $name->subsequent(true); } $name->usep(true); // insert some HTML $name->set_code($content); // print the editor to the browser: $name->print_editor('100%', intval($height)); }