11 require_once
'HTML/QuickForm/textarea.php';
15 'FCKeditor_BasePath' => ( isset(
$GLOBALS[
'HTML_QuickForm_htmlarea'][
'FCKeditor_BasePath']) ?
$GLOBALS[
'HTML_QuickForm_htmlarea'][
'FCKeditor_BasePath'] :
'./lib/FCKeditor'),
16 'TinyMCE_BasePath' => (isset($GLOBALS[
'HTML_QuickForm_htmlarea'][
'TinyMCE_BasePath']) ? $GLOBALS[
'HTML_QuickForm_htmlarea'][
'TinyMCE_BasePath'] :
'./lib/tiny_mce')
35 'theme',
'plugins',
'language',
'ask',
'docs_language',
'debug',
'focus_alert',
'directionality',
'auto_resize',
'browsers',
'dialog_type',
'accessibility_warnings',
'accessibility_focus',
'event_elements',
'table_inline_editing',
'object_resizing',
'custom_shortcuts',
'convert_urls',
'relative_urls',
'remove_script_host',
'document_base_url',
'content_css',
'popups_css',
'editor_css',
'width',
'height',
'visual',
'visual_table_class',
'cleanup',
'valid_elements',
'extended_valid_elements',
'invalid_elements',
'verify_css_classes',
'verify_html',
'preformatted',
'encoding',
'cleanup_on_startup',
'fix_content_duplication',
'inline_styles',
'convert_newlines_to_brs',
'force_br_newlines',
'force_p_newlines',
'entities',
'entity_encoding',
'remove_linebreaks',
'convert_fonts_to_spans',
'font_size_classes',
'font_size_style_values',
'merge_styles_invalid_parents',
'force_hex_style_colors',
'apply_source_formatting',
'trim_span_elements',
'doctype',
'fix_list_elements',
'fix_table_elements',
'theme_advanced_toolbar_location',
'theme_advanced_resizing',
'theme_advanced_buttons1_add_before',
'theme_advanced_buttons1_add',
'theme_advanced_buttons2_add',
'theme_advanced_buttons2_add_before',
'theme_advanced_buttons3_add_before',
'theme_advanced_buttons3_add',
'theme_advanced_toolbar_location',
'theme_advanced_toolbar_align',
'theme_advanced_path_location'
41 HTML_QuickForm_textarea::HTML_QuickForm_textarea($elementName, $elementLabel, $attributes);
42 $this->_type =
'htmlarea';
50 foreach ($this->tinyMCE_atts as $option){
51 if ( isset( $atts[$option] ) ){
52 if ( is_array($atts[$option]) ){
53 $this->wysiwygOptions[$option] = implode(
',',$atts[$option]);
55 $this->wysiwygOptions[$option] = $atts[$option];
72 if ($this->_flagFrozen) {
75 switch (strtolower($this->editorName)){
79 if ( !defined(
'HTML_QuickForm_htmlarea_nicEdit_loaded') ){
80 define(
'HTML_QuickForm_htmlarea_nicEdit_loaded',1);
81 echo
'<script language="javascript" type="text/javascript" src="'.DATAFACE_URL.
'/js/nicEdit/nicEdit.js"></script>';
83 echo
'<script language="javascript">
85 bkLib.onDomLoaded(function(){
86 new nicEditor({fullPanel: true, iconsPath: \''.DATAFACE_URL.
'/js/nicEdit/nicEditorIcons.gif\'}).panelInstance(\''.$this->getAttribute(
'id').
'\');
89 $html = ob_get_contents();
94 require_once
'FCKeditor/fckeditor.php';
95 $editor =
new FCKEditor($this->getName());
96 $editor->BasePath = $GLOBALS[
'HTML_QuickForm_htmlarea'][
'FCKeditor_BasePath'];
97 $editor->Value = $this->_value;
98 $editor->Width =
'100%';
99 $editor->Height =
'480';
102 $html = ob_get_contents();
108 if ( !defined(
'HTML_QuickForm_htmlarea_TinyMCE_loaded') ){
109 define(
'HTML_QuickForm_htmlarea_TinyMCE_loaded',
true);
110 echo
'<script language="javascript" type="text/javascript" src="'.$GLOBALS[
'HTML_QuickForm_htmlarea'][
'TinyMCE_BasePath'].
'/tiny_mce.js"></script>';
114 <script language="javascript" type="text/javascript">
116 editor_selector : "mceEditor",
118 elements : "'.$this->getAttribute(
'id').
'"';
119 foreach ($this->wysiwygOptions as $key=>$value){
121 '.$key.
' : "'.$value.
'"';
128 $out = ob_get_contents();
132 return $out.parent::toHtml();
153 function getFrozenHtml()
155 $value = $this->getValue();
156 $html =
'<div style="border: 1px solid #ccc; padding: 1em">'.$value.
'</div>';
158 return $html . $this->_getPersistantData();