24 include_once
"./Services/RTE/classes/class.ilRTE.php";
41 $this->plugins = array(
136 function addRTESupport($obj_id, $obj_type, $a_module =
"", $allowFormElements = FALSE, $cfg_template = null)
138 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
139 if (array_key_exists(
"show_rte",
$_POST))
144 include_once
"./classes/class.ilTemplate.php";
147 $tpl =
new ilTemplate(($cfg_template === null ?
"tpl.tinymce.html" : $cfg_template),
true,
true,
"Services/RTE");
149 if ($allowFormElements)
151 $tpl->touchBlock(
"formelements");
153 $tpl->setCurrentBlock(
"tinymce");
154 $tpl->setVariable(
"JAVASCRIPT_LOCATION",
"./Services/RTE/tiny_mce/tiny_mce.js");
155 include_once
"./classes/class.ilObject.php";
156 $tpl->setVariable(
"OBJ_ID", $obj_id);
157 $tpl->setVariable(
"OBJ_TYPE", $obj_type);
158 $tpl->setVariable(
"CLIENT_ID", CLIENT_ID);
165 .
','.$this->_buildAdvancedTableButtonsFromHTMLTags($tags)
168 $tpl->setVariable(
'BUTTONS_1', self::_removeRedundantSeparators($buttons_1));
169 $tpl->setVariable(
'BUTTONS_2', self::_removeRedundantSeparators($buttons_2));
170 $tpl->setVariable(
'BUTTONS_3', self::_removeRedundantSeparators($buttons_3));
172 $tpl->setVariable(
"ADDITIONAL_PLUGINS", join(
",", $this->plugins));
173 include_once
"./Services/Utilities/classes/class.ilUtil.php";
183 $tpl->parseCurrentBlock();
185 $this->tpl->setVariable(
"CONTENT_BLOCK",
$tpl->get());
190 $tpl =
new ilTemplate(
"tpl.rte.switch.html",
true,
true,
"Services/RTE");
191 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormActionByClass($this->ctrl->getCmdClass()), $this->ctrl->getCmd());
192 $tpl->setVariable(
"TEXT_SET_MODE", $this->lng->txt(
"set_edit_mode"));
193 $tpl->setVariable(
"TEXT_ENABLED", $this->lng->txt(
"rte_editor_enabled"));
194 $tpl->setVariable(
"TEXT_DISABLED", $this->lng->txt(
"rte_editor_disabled"));
197 $tpl->setVariable(
"SELECTED_ENABLED",
" selected=\"selected\"");
199 $tpl->setVariable(
"BTN_COMMAND", $this->ctrl->getCmd());
201 $this->tpl->setVariable(
"RTE_SWITCH",
$tpl->get());
214 include_once
"./classes/class.ilTemplate.php";
215 $tpl =
new ilTemplate(
"tpl.tinymce.html",
true,
true,
"Services/RTE");
216 $tpl->setCurrentBlock(
"tinymce");
217 $tpl->setVariable(
"JAVASCRIPT_LOCATION",
"./Services/RTE/tiny_mce/tiny_mce.js");
218 include_once
"./classes/class.ilObject.php";
219 $tpl->setVariable(
"OBJ_ID", $obj_id);
220 $tpl->setVariable(
"OBJ_TYPE", $obj_type);
221 $tpl->setVariable(
"CLIENT_ID", CLIENT_ID);
229 .
','.$this->_buildAdvancedTableButtonsFromHTMLTags($tags)
232 $tpl->setVariable(
'BUTTONS_1', self::_removeRedundantSeparators($buttons_1));
233 $tpl->setVariable(
'BUTTONS_2', self::_removeRedundantSeparators($buttons_2));
234 $tpl->setVariable(
'BUTTONS_3', self::_removeRedundantSeparators($buttons_3));
236 $tpl->setVariable(
"ADDITIONAL_PLUGINS", join(
",", $this->plugins));
237 include_once
"./Services/Utilities/classes/class.ilUtil.php";
247 $tpl->parseCurrentBlock();
248 $this->tpl->setVariable(
"CONTENT_BLOCK",
$tpl->get());
261 $validtags = array(
"strong",
"em",
"p",
"br",
"div",
"span");
262 $buttontags = array(
"strong",
"em");
263 include_once
"./classes/class.ilTemplate.php";
264 $template =
new ilTemplate(
"tpl.usereditor.html",
true,
true,
"Services/RTE");
265 $template->setCurrentBlock(
"tinymce");
266 $template->setVariable(
"JAVASCRIPT_LOCATION",
"./Services/RTE/tiny_mce/tiny_mce.js");
267 include_once
"./classes/class.ilObject.php";
268 $template->setVariable(
"SELECTOR", $editor_selector);
269 $template->setVariable(
"BLOCKFORMATS",
"");
273 $template->setVariable(
"STYLE_SELECT",
",styleselect");
276 include_once
"./Services/Utilities/classes/class.ilUtil.php";
280 $template->parseCurrentBlock();
281 $this->tpl->setCurrentBlock(
"HeadContent");
282 $this->tpl->setVariable(
"CONTENT_BLOCK", $template->get());
283 $this->tpl->parseCurrentBlock();
293 $this->styleselect = $a_styleselect;
303 return $this->styleselect;
309 $blockformats = array();
311 if (in_array(
"p", $a_html_tags))
313 array_push($blockformats,
"p");
315 if (in_array(
"div", $a_html_tags))
317 array_push($blockformats,
"div");
319 if (in_array(
"pre", $a_html_tags))
321 array_push($blockformats,
"pre");
323 if (in_array(
"code", $a_html_tags))
325 array_push($blockformats,
"code");
327 if (in_array(
"h1", $a_html_tags))
329 array_push($blockformats,
"h1");
331 if (in_array(
"h2", $a_html_tags))
333 array_push($blockformats,
"h2");
335 if (in_array(
"h3", $a_html_tags))
337 array_push($blockformats,
"h3");
339 if (in_array(
"h4", $a_html_tags))
341 array_push($blockformats,
"h4");
343 if (in_array(
"h5", $a_html_tags))
345 array_push($blockformats,
"h5");
347 if (in_array(
"h6", $a_html_tags))
349 array_push($blockformats,
"h6");
351 if (count($blockformats))
353 return join(
",", $blockformats);
363 $theme_advanced_buttons = array();
365 if($a_buttons_section == 1)
367 if (in_array(
"strong", $a_html_tags))
369 array_push($theme_advanced_buttons,
"bold");
371 if (in_array(
"em", $a_html_tags))
373 array_push($theme_advanced_buttons,
"italic");
375 if (in_array(
"u", $a_html_tags))
377 array_push($theme_advanced_buttons,
"underline");
379 if (in_array(
"strike", $a_html_tags))
381 array_push($theme_advanced_buttons,
"strikethrough");
383 if (count($theme_advanced_buttons))
385 array_push($theme_advanced_buttons,
"separator");
387 if (in_array(
"p", $a_html_tags))
389 array_push($theme_advanced_buttons,
"justifyleft");
390 array_push($theme_advanced_buttons,
"justifycenter");
391 array_push($theme_advanced_buttons,
"justifyright");
392 array_push($theme_advanced_buttons,
"justifyfull");
393 array_push($theme_advanced_buttons,
"separator");
397 array_push($theme_advanced_buttons,
"formatselect");
399 if (in_array(
"hr", $a_html_tags))
401 array_push($theme_advanced_buttons,
"hr");
403 array_push($theme_advanced_buttons,
"removeformat");
404 array_push($theme_advanced_buttons,
"separator");
405 if (in_array(
"sub", $a_html_tags))
407 array_push($theme_advanced_buttons,
"sub");
409 if (in_array(
"sup", $a_html_tags))
411 array_push($theme_advanced_buttons,
"sup");
413 if (in_array(
"font", $a_html_tags))
415 array_push($theme_advanced_buttons,
"fontselect");
416 array_push($theme_advanced_buttons,
"fontsizeselect");
418 array_push($theme_advanced_buttons,
"charmap");
419 if ((in_array(
"ol", $a_html_tags)) && (in_array(
"li", $a_html_tags)))
421 array_push($theme_advanced_buttons,
"bullist");
423 if ((in_array(
"ul", $a_html_tags)) && (in_array(
"li", $a_html_tags)))
425 array_push($theme_advanced_buttons,
"numlist");
427 array_push($theme_advanced_buttons,
"separator");
428 if (in_array(
"cite", $a_html_tags))
430 array_push($theme_advanced_buttons,
"cite");
432 if (in_array(
"abbr", $a_html_tags))
434 array_push($theme_advanced_buttons,
"abbr");
436 if (in_array(
"acronym", $a_html_tags))
438 array_push($theme_advanced_buttons,
"acronym");
440 if (in_array(
"del", $a_html_tags))
442 array_push($theme_advanced_buttons,
"del");
444 if (in_array(
"ins", $a_html_tags))
446 array_push($theme_advanced_buttons,
"ins");
448 if (in_array(
"blockquote", $a_html_tags))
450 array_push($theme_advanced_buttons,
"indent");
451 array_push($theme_advanced_buttons,
"outdent");
453 if (in_array(
"img", $a_html_tags))
456 array_push($theme_advanced_buttons,
"image");
457 array_push($theme_advanced_buttons,
"ibrowser");
459 if (in_array(
"a", $a_html_tags))
461 array_push($theme_advanced_buttons,
"link");
462 array_push($theme_advanced_buttons,
"unlink");
463 array_push($theme_advanced_buttons,
"anchor");
465 array_push($theme_advanced_buttons,
"separator");
466 array_push($theme_advanced_buttons,
"undo");
467 array_push($theme_advanced_buttons,
"redo");
469 if(is_array($this->buttons) && count($this->buttons))
471 array_push($theme_advanced_buttons,
"separator");
472 foreach($this->buttons as $button)
474 array_push($theme_advanced_buttons, $button);
478 array_push($theme_advanced_buttons,
"code");
479 array_push($theme_advanced_buttons,
"fullscreen");
481 else if($a_buttons_section == 2)
483 array_push($theme_advanced_buttons,
"cut");
484 array_push($theme_advanced_buttons,
"copy");
485 array_push($theme_advanced_buttons,
"paste");
486 array_push($theme_advanced_buttons,
"pastetext");
487 array_push($theme_advanced_buttons,
"pasteword");
489 else if($a_buttons_section == 3)
494 if (is_array($remove_buttons))
496 foreach ($remove_buttons as $buttontext)
498 if ((
$res = array_search($buttontext, $theme_advanced_buttons)) !== FALSE)
500 unset($theme_advanced_buttons[
$res]);
505 return join(
",", $theme_advanced_buttons);
510 $theme_advanced_buttons = array();
511 if (in_array(
"strong", $a_html_tags))
513 array_push($theme_advanced_buttons,
"bold");
515 if (in_array(
"em", $a_html_tags))
517 array_push($theme_advanced_buttons,
"italic");
519 if (in_array(
"u", $a_html_tags))
521 array_push($theme_advanced_buttons,
"underline");
523 if (in_array(
"strike", $a_html_tags))
525 array_push($theme_advanced_buttons,
"strikethrough");
527 if (in_array(
"p", $a_html_tags))
529 array_push($theme_advanced_buttons,
"justifyleft");
530 array_push($theme_advanced_buttons,
"justifycenter");
531 array_push($theme_advanced_buttons,
"justifyright");
532 array_push($theme_advanced_buttons,
"justifyfull");
536 array_push($theme_advanced_buttons,
"formatselect");
538 if (in_array(
"hr", $a_html_tags))
540 array_push($theme_advanced_buttons,
"hr");
542 if (in_array(
"sub", $a_html_tags))
544 array_push($theme_advanced_buttons,
"sub");
546 if (in_array(
"sup", $a_html_tags))
548 array_push($theme_advanced_buttons,
"sup");
550 if (in_array(
"font", $a_html_tags))
552 array_push($theme_advanced_buttons,
"fontselect");
553 array_push($theme_advanced_buttons,
"fontsizeselect");
555 if ((in_array(
"ol", $a_html_tags)) && (in_array(
"li", $a_html_tags)))
557 array_push($theme_advanced_buttons,
"bullist");
559 if ((in_array(
"ul", $a_html_tags)) && (in_array(
"li", $a_html_tags)))
561 array_push($theme_advanced_buttons,
"numlist");
563 if (in_array(
"cite", $a_html_tags))
565 array_push($theme_advanced_buttons,
"cite");
567 if (in_array(
"abbr", $a_html_tags))
569 array_push($theme_advanced_buttons,
"abbr");
571 if (in_array(
"acronym", $a_html_tags))
573 array_push($theme_advanced_buttons,
"acronym");
575 if (in_array(
"del", $a_html_tags))
577 array_push($theme_advanced_buttons,
"del");
579 if (in_array(
"ins", $a_html_tags))
581 array_push($theme_advanced_buttons,
"ins");
583 if (in_array(
"blockquote", $a_html_tags))
585 array_push($theme_advanced_buttons,
"indent");
586 array_push($theme_advanced_buttons,
"outdent");
588 if (in_array(
"img", $a_html_tags))
591 array_push($theme_advanced_buttons,
"image");
592 array_push($theme_advanced_buttons,
"ibrowser");
594 if (in_array(
"a", $a_html_tags))
596 array_push($theme_advanced_buttons,
"link");
597 array_push($theme_advanced_buttons,
"unlink");
598 array_push($theme_advanced_buttons,
"anchor");
602 if (is_array($remove_buttons))
604 foreach ($remove_buttons as $buttontext)
606 if ((
$res = array_search($buttontext, $theme_advanced_buttons)) !== FALSE)
608 unset($theme_advanced_buttons[
$res]);
613 return join(
",", $theme_advanced_buttons);
618 $theme_advanced_buttons = array();
619 if (in_array(
"table", $a_html_tags) && in_array(
"tr", $a_html_tags) && in_array(
"td", $a_html_tags))
621 array_push($theme_advanced_buttons,
"tablecontrols");
625 if (is_array($remove_buttons))
627 foreach ($remove_buttons as $buttontext)
629 if ((
$res = array_search($buttontext, $theme_advanced_buttons)) !== FALSE)
631 unset($theme_advanced_buttons[
$res]);
636 return join(
",", $theme_advanced_buttons);
642 $lang = $ilUser->getLanguage();
643 if (file_exists(
"./Services/RTE/tiny_mce/langs/$lang.js"))
655 $valid_elements = array();
656 foreach ($a_html_tags as $tag)
661 array_push($valid_elements,
"a[accesskey|charset|class|coords|dir<ltr?rtl|href|hreflang|id|lang|name"
662 .
"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup"
663 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|rel|rev"
664 .
"|shape<circle?default?poly?rect|style|tabindex|title|target|type]");
667 array_push($valid_elements,
"abbr[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
668 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
672 array_push($valid_elements,
"acronym[class|dir<ltr?rtl|id|id|lang|onclick|ondblclick|onkeydown|onkeypress"
673 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
677 array_push($valid_elements,
"address[class|align|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
678 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
679 .
"|onmouseup|style|title]");
682 array_push($valid_elements,
"applet[align<bottom?left?middle?right?top|alt|archive|class|code|codebase"
683 .
"|height|hspace|id|name|object|style|title|vspace|width]");
686 array_push($valid_elements,
"area[accesskey|alt|class|coords|dir<ltr?rtl|href|id|lang|nohref<nohref"
687 .
"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup"
688 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup"
689 .
"|shape<circle?default?poly?rect|style|tabindex|title|target]");
692 array_push($valid_elements,
"base[href|target]");
695 array_push($valid_elements,
"basefont[color|face|id|size]");
698 array_push($valid_elements,
"bdo[class|dir<ltr?rtl|id|lang|style|title]");
701 array_push($valid_elements,
"big[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
702 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
706 array_push($valid_elements,
"blockquote[dir|style|cite|class|dir<ltr?rtl|id|lang|onclick|ondblclick"
707 .
"|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout"
708 .
"|onmouseover|onmouseup|style|title]");
711 array_push($valid_elements,
"body[alink|background|bgcolor|class|dir<ltr?rtl|id|lang|link|onclick"
712 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onload|onmousedown|onmousemove"
713 .
"|onmouseout|onmouseover|onmouseup|onunload|style|title|text|vlink]");
716 array_push($valid_elements,
"br[class|clear<all?left?none?right|id|style|title]");
719 array_push($valid_elements,
"button[accesskey|class|dir<ltr?rtl|disabled<disabled|id|lang|name|onblur"
720 .
"|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onmousedown"
721 .
"|onmousemove|onmouseout|onmouseover|onmouseup|style|tabindex|title|type"
725 array_push($valid_elements,
"caption[align<bottom?left?right?top|class|dir<ltr?rtl|id|lang|onclick"
726 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
727 .
"|onmouseout|onmouseover|onmouseup|style|title]");
730 array_push($valid_elements,
"center[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
731 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
735 array_push($valid_elements,
"cite[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
736 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
740 array_push($valid_elements,
"code[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
741 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
745 array_push($valid_elements,
"col[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id"
746 .
"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
747 .
"|onmousemove|onmouseout|onmouseover|onmouseup|span|style|title"
748 .
"|valign<baseline?bottom?middle?top|width]");
751 array_push($valid_elements,
"colgroup[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl"
752 .
"|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
753 .
"|onmousemove|onmouseout|onmouseover|onmouseup|span|style|title"
754 .
"|valign<baseline?bottom?middle?top|width]");
757 array_push($valid_elements,
"dd[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
758 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
761 array_push($valid_elements,
"del[cite|class|datetime|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
762 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
763 .
"|onmouseup|style|title]");
766 array_push($valid_elements,
"dfn[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
767 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
771 array_push($valid_elements,
"dir[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
772 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
773 .
"|onmouseup|style|title]");
776 array_push($valid_elements,
"div[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
777 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
778 .
"|onmouseout|onmouseover|onmouseup|style|title]");
781 array_push($valid_elements,
"dl[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
782 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
783 .
"|onmouseup|style|title]");
786 array_push($valid_elements,
"dt[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
787 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
790 array_push($valid_elements,
"em/i[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
791 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
795 array_push($valid_elements,
"fieldset[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
796 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
800 array_push($valid_elements,
"font[class|color|dir<ltr?rtl|face|id|lang|size|style|title]");
803 array_push($valid_elements,
"form[accept|accept-charset|action|class|dir<ltr?rtl|enctype|id|lang"
804 .
"|method<get?post|name|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
805 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onreset|onsubmit"
806 .
"|style|title|target]");
809 array_push($valid_elements,
"frame[class|frameborder|id|longdesc|marginheight|marginwidth|name"
810 .
"|noresize<noresize|scrolling<auto?no?yes|src|style|title]");
813 array_push($valid_elements,
"frameset[class|cols|id|onload|onunload|rows|style|title]");
816 array_push($valid_elements,
"h1[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
817 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
818 .
"|onmouseout|onmouseover|onmouseup|style|title]");
821 array_push($valid_elements,
"h2[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
822 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
823 .
"|onmouseout|onmouseover|onmouseup|style|title]");
826 array_push($valid_elements,
"h3[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
827 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
828 .
"|onmouseout|onmouseover|onmouseup|style|title]");
831 array_push($valid_elements,
"h4[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
832 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
833 .
"|onmouseout|onmouseover|onmouseup|style|title]");
836 array_push($valid_elements,
"h5[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
837 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
838 .
"|onmouseout|onmouseover|onmouseup|style|title]");
841 array_push($valid_elements,
"h6[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
842 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
843 .
"|onmouseout|onmouseover|onmouseup|style|title]");
846 array_push($valid_elements,
"head[dir<ltr?rtl|lang|profile]");
849 array_push($valid_elements,
"hr[align<center?left?right|class|dir<ltr?rtl|id|lang|noshade<noshade|onclick"
850 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
851 .
"|onmouseout|onmouseover|onmouseup|size|style|title|width]");
854 array_push($valid_elements,
"html[dir<ltr?rtl|lang|version]");
857 array_push($valid_elements,
"iframe[align<bottom?left?middle?right?top|class|frameborder|height|id"
858 .
"|longdesc|marginheight|marginwidth|name|scrolling<auto?no?yes|src|style"
862 array_push($valid_elements,
"img[align<bottom?left?middle?right?top|alt|border|class|dir<ltr?rtl|height"
863 .
"|hspace|id|ismap<ismap|lang|longdesc|name|onclick|ondblclick|onkeydown"
864 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
865 .
"|onmouseup|src|style|title|usemap|vspace|width]");
868 array_push($valid_elements,
"input[accept|accesskey|align<bottom?left?middle?right?top|alt"
869 .
"|checked<checked|class|dir<ltr?rtl|disabled<disabled|id|ismap<ismap|lang"
870 .
"|maxlength|name|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress"
871 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onselect"
872 .
"|readonly<readonly|size|src|style|tabindex|title"
873 .
"|type<button?checkbox?file?hidden?image?password?radio?reset?submit?text"
877 array_push($valid_elements,
"ins[cite|class|datetime|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
878 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
879 .
"|onmouseup|style|title]");
882 array_push($valid_elements,
"isindex[class|dir<ltr?rtl|id|lang|prompt|style|title]");
885 array_push($valid_elements,
"kbd[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
886 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
890 array_push($valid_elements,
"label[accesskey|class|dir<ltr?rtl|for|id|lang|onblur|onclick|ondblclick"
891 .
"|onfocus|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout"
892 .
"|onmouseover|onmouseup|style|title]");
895 array_push($valid_elements,
"legend[align<bottom?left?right?top|accesskey|class|dir<ltr?rtl|id|lang"
896 .
"|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
897 .
"|onmouseout|onmouseover|onmouseup|style|title]");
900 array_push($valid_elements,
"li[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
901 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title|type"
905 array_push($valid_elements,
"link[charset|class|dir<ltr?rtl|href|hreflang|id|lang|media|onclick"
906 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
907 .
"|onmouseout|onmouseover|onmouseup|rel|rev|style|title|target|type]");
910 array_push($valid_elements,
"map[class|dir<ltr?rtl|id|lang|name|onclick|ondblclick|onkeydown|onkeypress"
911 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
915 array_push($valid_elements,
"menu[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
916 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
917 .
"|onmouseup|style|title]");
920 array_push($valid_elements,
"meta[content|dir<ltr?rtl|http-equiv|lang|name|scheme]");
923 array_push($valid_elements,
"noframes[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
924 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
928 array_push($valid_elements,
"noscript[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
929 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
933 array_push($valid_elements,
"object[align<bottom?left?middle?right?top|archive|border|class|classid"
934 .
"|codebase|codetype|data|declare|dir<ltr?rtl|height|hspace|id|lang|name"
935 .
"|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
936 .
"|onmouseout|onmouseover|onmouseup|standby|style|tabindex|title|type|usemap"
940 array_push($valid_elements,
"ol[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
941 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
942 .
"|onmouseup|start|style|title|type]");
945 array_push($valid_elements,
"optgroup[class|dir<ltr?rtl|disabled<disabled|id|label|lang|onclick"
946 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
947 .
"|onmouseout|onmouseover|onmouseup|style|title]");
950 array_push($valid_elements,
"option[class|dir<ltr?rtl|disabled<disabled|id|label|lang|onclick|ondblclick"
951 .
"|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout"
952 .
"|onmouseover|onmouseup|selected<selected|style|title|value]");
955 array_push($valid_elements,
"p[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
956 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
957 .
"|onmouseout|onmouseover|onmouseup|style|title]");
960 array_push($valid_elements,
"param[id|name|type|value|valuetype<DATA?OBJECT?REF]");
966 array_push($valid_elements,
"pre/listing/plaintext/xmp[align|class|dir<ltr?rtl|id|lang|onclick|ondblclick"
967 .
"|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout"
968 .
"|onmouseover|onmouseup|style|title|width]");
971 array_push($valid_elements,
"q[cite|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
972 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
976 array_push($valid_elements,
"s[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
977 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
980 array_push($valid_elements,
"samp[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
981 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
985 array_push($valid_elements,
"script[charset|defer|language|src|type]");
988 array_push($valid_elements,
"select[class|dir<ltr?rtl|disabled<disabled|id|lang|multiple<multiple|name"
989 .
"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup"
990 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|size|style"
991 .
"|tabindex|title]");
994 array_push($valid_elements,
"small[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
995 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
999 array_push($valid_elements,
"span[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
1000 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1001 .
"|onmouseup|style|title]");
1004 array_push($valid_elements,
"strike[class|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
1005 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1006 .
"|onmouseup|style|title]");
1009 array_push($valid_elements,
"strong/b[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1010 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1014 array_push($valid_elements,
"style[dir<ltr?rtl|lang|media|title|type]");
1017 array_push($valid_elements,
"sub[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1018 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1022 array_push($valid_elements,
"sup[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1023 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1027 array_push($valid_elements,
"table[align<center?left?right|bgcolor|border|cellpadding|cellspacing|class"
1028 .
"|dir<ltr?rtl|frame|height|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1029 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|rules"
1030 .
"|style|summary|title|width]");
1033 array_push($valid_elements,
"tbody[align<center?char?justify?left?right|char|class|charoff|dir<ltr?rtl|id"
1034 .
"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
1035 .
"|onmousemove|onmouseout|onmouseover|onmouseup|style|title"
1036 .
"|valign<baseline?bottom?middle?top]");
1039 array_push($valid_elements,
"td[abbr|align<center?char?justify?left?right|axis|bgcolor|char|charoff|class"
1040 .
"|colspan|dir<ltr?rtl|headers|height|id|lang|nowrap<nowrap|onclick"
1041 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1042 .
"|onmouseout|onmouseover|onmouseup|rowspan|scope<col?colgroup?row?rowgroup"
1043 .
"|style|title|valign<baseline?bottom?middle?top|width]");
1046 array_push($valid_elements,
"textarea[accesskey|class|cols|dir<ltr?rtl|disabled<disabled|id|lang|name"
1047 .
"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup"
1048 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onselect"
1049 .
"|readonly<readonly|rows|style|tabindex|title]");
1052 array_push($valid_elements,
"tfoot[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id"
1053 .
"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
1054 .
"|onmousemove|onmouseout|onmouseover|onmouseup|style|title"
1055 .
"|valign<baseline?bottom?middle?top]");
1058 array_push($valid_elements,
"th[abbr|align<center?char?justify?left?right|axis|bgcolor|char|charoff|class"
1059 .
"|colspan|dir<ltr?rtl|headers|height|id|lang|nowrap<nowrap|onclick"
1060 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1061 .
"|onmouseout|onmouseover|onmouseup|rowspan|scope<col?colgroup?row?rowgroup"
1062 .
"|style|title|valign<baseline?bottom?middle?top|width]");
1065 array_push($valid_elements,
"thead[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id"
1066 .
"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
1067 .
"|onmousemove|onmouseout|onmouseover|onmouseup|style|title"
1068 .
"|valign<baseline?bottom?middle?top]");
1071 array_push($valid_elements,
"title[dir<ltr?rtl|lang]");
1074 array_push($valid_elements,
"tr[abbr|align<center?char?justify?left?right|bgcolor|char|charoff|class"
1075 .
"|rowspan|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1076 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1077 .
"|title|valign<baseline?bottom?middle?top]");
1080 array_push($valid_elements,
"tt[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
1081 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
1084 array_push($valid_elements,
"u[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
1085 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
1089 array_push($valid_elements,
"span[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
1090 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1091 .
"|onmouseup|style|title]");
1094 array_push($valid_elements,
"ul[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
1095 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1096 .
"|onmouseup|style|title|type]");
1099 array_push($valid_elements,
"var[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1100 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1105 return join(
",", $valid_elements);
1117 $this->root_block_element = $a_root_block_element;
1142 if(is_array($a_button))
1144 $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, $a_button));
1148 $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, array($a_button)));
1166 return implode(
',', $this->disabled_buttons);
1185 while(strpos($a_string,
'separator,separator') !==
false)
1187 $a_string = str_replace(
'separator,separator',
'separator', $a_string);
1190 while(strpos($a_string,
',,') !==
false)
1192 $a_string = str_replace(
',,',
',', $a_string);
1195 if($a_string{0} ==
',')
1197 $a_string = (string)substr($a_string, 1);
1200 if(strlen($a_string) && $a_string{strlen($a_string) - 1} ==
',')
1202 $a_string = substr($a_string, 0, strlen($a_string) - 1);