24 include_once
"./Services/RTE/classes/class.ilRTE.php";
52 $a_version =
"3.5.11";
61 $this->version = $a_version;
62 $this->
vd =
"_".str_replace(
".",
"_", $a_version);
70 $this->plugins = array(
94 $this->addInternalTinyMCEImageManager();
100 public function addInternalTinyMCEImageManager()
105 global $ilClientIniFile;
107 if(!$ilClientIniFile->readVariable(
'tinymce',
'use_advanced_img_mng'))
136 if(!in_array(
'img', $tags))
155 $this->addInternalTinyMCEImageManager();
158 protected function handleIliasImageManagerRemoved()
163 global $ilClientIniFile;
165 if(!$ilClientIniFile->readVariable(
'tinymce',
'use_advanced_img_mng'))
182 if(self::ILIAS_IMG_MANAGER_PLUGIN == $a_plugin_name)
197 if(self::ILIAS_IMG_MANAGER_PLUGIN == $a_plugin_name)
199 $this->handleIliasImageManagerRemoved();
276 function addRTESupport($obj_id, $obj_type, $a_module =
"", $allowFormElements = FALSE, $cfg_template = null, $hide_switch =
false)
280 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
288 if($ilBrowser->isMobile())
297 include_once
"./Services/UICore/classes/class.ilTemplate.php";
300 $tpl =
new ilTemplate(($cfg_template === null ?
"tpl.tinymce.html" : $cfg_template),
true,
true,
"Services/RTE");
304 if ($allowFormElements)
306 $tpl->touchBlock(
"formelements");
308 $tpl->setCurrentBlock(
"tinymce");
309 $tpl->setVariable(
"JAVASCRIPT_LOCATION",
"./Services/RTE/tiny_mce".$this->
vd.
"/tiny_mce.js");
310 include_once
"./Services/Object/classes/class.ilObject.php";
311 $tpl->setVariable(
"OBJ_ID", $obj_id);
312 $tpl->setVariable(
"OBJ_TYPE", $obj_type);
313 $tpl->setVariable(
"CLIENT_ID", CLIENT_ID);
320 .
','.$this->_buildAdvancedTableButtonsFromHTMLTags($tags)
323 $tpl->setVariable(
'BUTTONS_1', self::_removeRedundantSeparators($buttons_1));
324 $tpl->setVariable(
'BUTTONS_2', self::_removeRedundantSeparators($buttons_2));
325 $tpl->setVariable(
'BUTTONS_3', self::_removeRedundantSeparators($buttons_3));
327 $tpl->setVariable(
"ADDITIONAL_PLUGINS", join(
",", $this->plugins));
328 include_once
"./Services/Utilities/classes/class.ilUtil.php";
338 $tpl->parseCurrentBlock();
340 $this->tpl->setVariable(
"CONTENT_BLOCK",
$tpl->get());
366 $tpl->touchBlock(remove_img_context_menu_item);
380 include_once
"./Services/UICore/classes/class.ilTemplate.php";
381 $tpl =
new ilTemplate(
"tpl.tinymce.html",
true,
true,
"Services/RTE");
383 $tpl->setCurrentBlock(
"tinymce");
384 $tpl->setVariable(
"JAVASCRIPT_LOCATION",
"./Services/RTE/tiny_mce".$this->
vd.
"/tiny_mce.js");
385 include_once
"./Services/Object/classes/class.ilObject.php";
386 $tpl->setVariable(
"OBJ_ID", $obj_id);
387 $tpl->setVariable(
"OBJ_TYPE", $obj_type);
388 $tpl->setVariable(
"CLIENT_ID", CLIENT_ID);
396 .
','.$this->_buildAdvancedTableButtonsFromHTMLTags($tags)
399 $tpl->setVariable(
'BUTTONS_1', self::_removeRedundantSeparators($buttons_1));
400 $tpl->setVariable(
'BUTTONS_2', self::_removeRedundantSeparators($buttons_2));
401 $tpl->setVariable(
'BUTTONS_3', self::_removeRedundantSeparators($buttons_3));
403 $tpl->setVariable(
"ADDITIONAL_PLUGINS", join(
",", $this->plugins));
404 include_once
"./Services/Utilities/classes/class.ilUtil.php";
414 $tpl->parseCurrentBlock();
415 $this->tpl->setVariable(
"CONTENT_BLOCK",
$tpl->get());
428 $validtags = array(
"strong",
"em",
"p",
"br",
"div",
"span");
429 $buttontags = array(
"strong",
"em");
430 include_once
"./Services/UICore/classes/class.ilTemplate.php";
431 $template =
new ilTemplate(
"tpl.usereditor.html",
true,
true,
"Services/RTE");
433 $template->setCurrentBlock(
"tinymce");
434 $template->setVariable(
"JAVASCRIPT_LOCATION",
"./Services/RTE/tiny_mce".$this->
vd.
"/tiny_mce.js");
435 include_once
"./Services/Object/classes/class.ilObject.php";
436 $template->setVariable(
"SELECTOR", $editor_selector);
437 $template->setVariable(
"BLOCKFORMATS",
"");
441 $template->setVariable(
"STYLE_SELECT",
",styleselect");
444 include_once
"./Services/Utilities/classes/class.ilUtil.php";
448 $template->parseCurrentBlock();
449 $this->tpl->setCurrentBlock(
"HeadContent");
450 $this->tpl->setVariable(
"CONTENT_BLOCK", $template->get());
451 $this->tpl->parseCurrentBlock();
461 $this->styleselect = $a_styleselect;
471 return $this->styleselect;
477 $blockformats = array();
479 if (in_array(
"p", $a_html_tags))
481 array_push($blockformats,
"p");
483 if (in_array(
"div", $a_html_tags))
485 array_push($blockformats,
"div");
487 if (in_array(
"pre", $a_html_tags))
489 array_push($blockformats,
"pre");
491 if (in_array(
"code", $a_html_tags))
493 array_push($blockformats,
"code");
495 if (in_array(
"h1", $a_html_tags))
497 array_push($blockformats,
"h1");
499 if (in_array(
"h2", $a_html_tags))
501 array_push($blockformats,
"h2");
503 if (in_array(
"h3", $a_html_tags))
505 array_push($blockformats,
"h3");
507 if (in_array(
"h4", $a_html_tags))
509 array_push($blockformats,
"h4");
511 if (in_array(
"h5", $a_html_tags))
513 array_push($blockformats,
"h5");
515 if (in_array(
"h6", $a_html_tags))
517 array_push($blockformats,
"h6");
519 if (count($blockformats))
521 return join(
",", $blockformats);
531 $theme_advanced_buttons = array();
533 if($a_buttons_section == 1)
535 if (in_array(
"strong", $a_html_tags))
537 array_push($theme_advanced_buttons,
"bold");
539 if (in_array(
"em", $a_html_tags))
541 array_push($theme_advanced_buttons,
"italic");
543 if (in_array(
"u", $a_html_tags))
545 array_push($theme_advanced_buttons,
"underline");
547 if (in_array(
"strike", $a_html_tags))
549 array_push($theme_advanced_buttons,
"strikethrough");
551 if (count($theme_advanced_buttons))
553 array_push($theme_advanced_buttons,
"separator");
555 if (in_array(
"p", $a_html_tags))
557 array_push($theme_advanced_buttons,
"justifyleft");
558 array_push($theme_advanced_buttons,
"justifycenter");
559 array_push($theme_advanced_buttons,
"justifyright");
560 array_push($theme_advanced_buttons,
"justifyfull");
561 array_push($theme_advanced_buttons,
"separator");
565 array_push($theme_advanced_buttons,
"formatselect");
567 if (in_array(
"hr", $a_html_tags))
569 array_push($theme_advanced_buttons,
"hr");
571 array_push($theme_advanced_buttons,
"removeformat");
572 array_push($theme_advanced_buttons,
"separator");
573 if (in_array(
"sub", $a_html_tags))
575 array_push($theme_advanced_buttons,
"sub");
577 if (in_array(
"sup", $a_html_tags))
579 array_push($theme_advanced_buttons,
"sup");
581 if (in_array(
"font", $a_html_tags))
583 array_push($theme_advanced_buttons,
"fontselect");
584 array_push($theme_advanced_buttons,
"fontsizeselect");
586 array_push($theme_advanced_buttons,
"charmap");
587 if ((in_array(
"ol", $a_html_tags)) && (in_array(
"li", $a_html_tags)))
589 array_push($theme_advanced_buttons,
"bullist");
591 if ((in_array(
"ul", $a_html_tags)) && (in_array(
"li", $a_html_tags)))
593 array_push($theme_advanced_buttons,
"numlist");
595 array_push($theme_advanced_buttons,
"separator");
596 if (in_array(
"cite", $a_html_tags))
598 array_push($theme_advanced_buttons,
"cite");
600 if (in_array(
"abbr", $a_html_tags))
602 array_push($theme_advanced_buttons,
"abbr");
604 if (in_array(
"acronym", $a_html_tags))
606 array_push($theme_advanced_buttons,
"acronym");
608 if (in_array(
"del", $a_html_tags))
610 array_push($theme_advanced_buttons,
"del");
612 if (in_array(
"ins", $a_html_tags))
614 array_push($theme_advanced_buttons,
"ins");
616 if (in_array(
"blockquote", $a_html_tags))
618 array_push($theme_advanced_buttons,
"indent");
619 array_push($theme_advanced_buttons,
"outdent");
621 if (in_array(
"img", $a_html_tags))
624 array_push($theme_advanced_buttons,
"image");
625 array_push($theme_advanced_buttons,
"ibrowser");
626 array_push($theme_advanced_buttons,
"ilimgupload");
628 if (in_array(
"a", $a_html_tags))
630 array_push($theme_advanced_buttons,
"link");
631 array_push($theme_advanced_buttons,
"unlink");
632 array_push($theme_advanced_buttons,
"anchor");
634 array_push($theme_advanced_buttons,
"separator");
635 array_push($theme_advanced_buttons,
"undo");
636 array_push($theme_advanced_buttons,
"redo");
638 if(is_array($this->buttons) && count($this->buttons))
640 array_push($theme_advanced_buttons,
"separator");
641 foreach($this->buttons as $button)
643 array_push($theme_advanced_buttons, $button);
647 array_push($theme_advanced_buttons,
"code");
648 array_push($theme_advanced_buttons,
"fullscreen");
651 array_push($theme_advanced_buttons,
"pasteword");
653 else if($a_buttons_section == 2)
655 array_push($theme_advanced_buttons,
"cut");
656 array_push($theme_advanced_buttons,
"copy");
657 array_push($theme_advanced_buttons,
"paste");
658 array_push($theme_advanced_buttons,
"pastetext");
662 else if($a_buttons_section == 3)
667 if (is_array($remove_buttons))
669 foreach ($remove_buttons as $buttontext)
671 if ((
$res = array_search($buttontext, $theme_advanced_buttons)) !== FALSE)
673 unset($theme_advanced_buttons[
$res]);
678 return join(
",", $theme_advanced_buttons);
683 $theme_advanced_buttons = array();
684 if (in_array(
"strong", $a_html_tags))
686 array_push($theme_advanced_buttons,
"bold");
688 if (in_array(
"em", $a_html_tags))
690 array_push($theme_advanced_buttons,
"italic");
692 if (in_array(
"u", $a_html_tags))
694 array_push($theme_advanced_buttons,
"underline");
696 if (in_array(
"strike", $a_html_tags))
698 array_push($theme_advanced_buttons,
"strikethrough");
700 if (in_array(
"p", $a_html_tags))
702 array_push($theme_advanced_buttons,
"justifyleft");
703 array_push($theme_advanced_buttons,
"justifycenter");
704 array_push($theme_advanced_buttons,
"justifyright");
705 array_push($theme_advanced_buttons,
"justifyfull");
709 array_push($theme_advanced_buttons,
"formatselect");
711 if (in_array(
"hr", $a_html_tags))
713 array_push($theme_advanced_buttons,
"hr");
715 if (in_array(
"sub", $a_html_tags))
717 array_push($theme_advanced_buttons,
"sub");
719 if (in_array(
"sup", $a_html_tags))
721 array_push($theme_advanced_buttons,
"sup");
723 if (in_array(
"font", $a_html_tags))
725 array_push($theme_advanced_buttons,
"fontselect");
726 array_push($theme_advanced_buttons,
"fontsizeselect");
728 if ((in_array(
"ol", $a_html_tags)) && (in_array(
"li", $a_html_tags)))
730 array_push($theme_advanced_buttons,
"bullist");
732 if ((in_array(
"ul", $a_html_tags)) && (in_array(
"li", $a_html_tags)))
734 array_push($theme_advanced_buttons,
"numlist");
736 if (in_array(
"cite", $a_html_tags))
738 array_push($theme_advanced_buttons,
"cite");
740 if (in_array(
"abbr", $a_html_tags))
742 array_push($theme_advanced_buttons,
"abbr");
744 if (in_array(
"acronym", $a_html_tags))
746 array_push($theme_advanced_buttons,
"acronym");
748 if (in_array(
"del", $a_html_tags))
750 array_push($theme_advanced_buttons,
"del");
752 if (in_array(
"ins", $a_html_tags))
754 array_push($theme_advanced_buttons,
"ins");
756 if (in_array(
"blockquote", $a_html_tags))
758 array_push($theme_advanced_buttons,
"indent");
759 array_push($theme_advanced_buttons,
"outdent");
761 if (in_array(
"img", $a_html_tags))
764 array_push($theme_advanced_buttons,
"image");
765 array_push($theme_advanced_buttons,
"ibrowser");
766 array_push($theme_advanced_buttons,
"ilimgupload");
768 if (in_array(
"a", $a_html_tags))
770 array_push($theme_advanced_buttons,
"link");
771 array_push($theme_advanced_buttons,
"unlink");
772 array_push($theme_advanced_buttons,
"anchor");
776 if (is_array($remove_buttons))
778 foreach ($remove_buttons as $buttontext)
780 if ((
$res = array_search($buttontext, $theme_advanced_buttons)) !== FALSE)
782 unset($theme_advanced_buttons[
$res]);
787 return join(
",", $theme_advanced_buttons);
792 $theme_advanced_buttons = array();
793 if (in_array(
"table", $a_html_tags) && in_array(
"tr", $a_html_tags) && in_array(
"td", $a_html_tags))
795 array_push($theme_advanced_buttons,
"tablecontrols");
799 if (is_array($remove_buttons))
801 foreach ($remove_buttons as $buttontext)
803 if ((
$res = array_search($buttontext, $theme_advanced_buttons)) !== FALSE)
805 unset($theme_advanced_buttons[
$res]);
810 return join(
",", $theme_advanced_buttons);
816 $lang = $ilUser->getLanguage();
817 if (file_exists(
"./Services/RTE/tiny_mce".$this->
vd.
"/langs/$lang.js"))
829 $valid_elements = array();
830 foreach ($a_html_tags as $tag)
835 array_push($valid_elements,
"a[accesskey|charset|class|coords|dir<ltr?rtl|href|hreflang|id|lang|name"
836 .
"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup"
837 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|rel|rev"
838 .
"|shape<circle?default?poly?rect|style|tabindex|title|target|type]");
841 array_push($valid_elements,
"abbr[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
842 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
846 array_push($valid_elements,
"acronym[class|dir<ltr?rtl|id|id|lang|onclick|ondblclick|onkeydown|onkeypress"
847 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
851 array_push($valid_elements,
"address[class|align|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
852 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
853 .
"|onmouseup|style|title]");
856 array_push($valid_elements,
"applet[align<bottom?left?middle?right?top|alt|archive|class|code|codebase"
857 .
"|height|hspace|id|name|object|style|title|vspace|width]");
860 array_push($valid_elements,
"area[accesskey|alt|class|coords|dir<ltr?rtl|href|id|lang|nohref<nohref"
861 .
"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup"
862 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup"
863 .
"|shape<circle?default?poly?rect|style|tabindex|title|target]");
866 array_push($valid_elements,
"base[href|target]");
869 array_push($valid_elements,
"basefont[color|face|id|size]");
872 array_push($valid_elements,
"bdo[class|dir<ltr?rtl|id|lang|style|title]");
875 array_push($valid_elements,
"big[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
876 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
880 array_push($valid_elements,
"blockquote[dir|style|cite|class|dir<ltr?rtl|id|lang|onclick|ondblclick"
881 .
"|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout"
882 .
"|onmouseover|onmouseup|style|title]");
885 array_push($valid_elements,
"body[alink|background|bgcolor|class|dir<ltr?rtl|id|lang|link|onclick"
886 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onload|onmousedown|onmousemove"
887 .
"|onmouseout|onmouseover|onmouseup|onunload|style|title|text|vlink]");
890 array_push($valid_elements,
"br[class|clear<all?left?none?right|id|style|title]");
893 array_push($valid_elements,
"button[accesskey|class|dir<ltr?rtl|disabled<disabled|id|lang|name|onblur"
894 .
"|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onmousedown"
895 .
"|onmousemove|onmouseout|onmouseover|onmouseup|style|tabindex|title|type"
899 array_push($valid_elements,
"caption[align<bottom?left?right?top|class|dir<ltr?rtl|id|lang|onclick"
900 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
901 .
"|onmouseout|onmouseover|onmouseup|style|title]");
904 array_push($valid_elements,
"center[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
905 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
909 array_push($valid_elements,
"cite[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
910 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
914 array_push($valid_elements,
"code[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
915 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
919 array_push($valid_elements,
"col[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id"
920 .
"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
921 .
"|onmousemove|onmouseout|onmouseover|onmouseup|span|style|title"
922 .
"|valign<baseline?bottom?middle?top|width]");
925 array_push($valid_elements,
"colgroup[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl"
926 .
"|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
927 .
"|onmousemove|onmouseout|onmouseover|onmouseup|span|style|title"
928 .
"|valign<baseline?bottom?middle?top|width]");
931 array_push($valid_elements,
"dd[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
932 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
935 array_push($valid_elements,
"del[cite|class|datetime|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
936 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
937 .
"|onmouseup|style|title]");
940 array_push($valid_elements,
"dfn[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
941 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
945 array_push($valid_elements,
"dir[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
946 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
947 .
"|onmouseup|style|title]");
950 array_push($valid_elements,
"div[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
951 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
952 .
"|onmouseout|onmouseover|onmouseup|style|title]");
955 array_push($valid_elements,
"dl[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
956 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
957 .
"|onmouseup|style|title]");
960 array_push($valid_elements,
"dt[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
961 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
964 array_push($valid_elements,
"em/i[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
965 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
969 array_push($valid_elements,
"fieldset[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
970 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
974 array_push($valid_elements,
"font[class|color|dir<ltr?rtl|face|id|lang|size|style|title]");
977 array_push($valid_elements,
"form[accept|accept-charset|action|class|dir<ltr?rtl|enctype|id|lang"
978 .
"|method<get?post|name|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
979 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onreset|onsubmit"
980 .
"|style|title|target]");
983 array_push($valid_elements,
"frame[class|frameborder|id|longdesc|marginheight|marginwidth|name"
984 .
"|noresize<noresize|scrolling<auto?no?yes|src|style|title]");
987 array_push($valid_elements,
"frameset[class|cols|id|onload|onunload|rows|style|title]");
990 array_push($valid_elements,
"h1[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
991 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
992 .
"|onmouseout|onmouseover|onmouseup|style|title]");
995 array_push($valid_elements,
"h2[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
996 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
997 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1000 array_push($valid_elements,
"h3[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
1001 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1002 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1005 array_push($valid_elements,
"h4[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
1006 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1007 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1010 array_push($valid_elements,
"h5[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
1011 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1012 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1015 array_push($valid_elements,
"h6[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
1016 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1017 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1020 array_push($valid_elements,
"head[dir<ltr?rtl|lang|profile]");
1023 array_push($valid_elements,
"hr[align<center?left?right|class|dir<ltr?rtl|id|lang|noshade<noshade|onclick"
1024 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1025 .
"|onmouseout|onmouseover|onmouseup|size|style|title|width]");
1028 array_push($valid_elements,
"html[dir<ltr?rtl|lang|version]");
1031 array_push($valid_elements,
"iframe[align<bottom?left?middle?right?top|class|frameborder|height|id"
1032 .
"|longdesc|marginheight|marginwidth|name|scrolling<auto?no?yes|src|style"
1036 array_push($valid_elements,
"img[align<bottom?left?middle?right?top|alt|border|class|dir<ltr?rtl|height"
1037 .
"|hspace|id|ismap<ismap|lang|longdesc|name|onclick|ondblclick|onkeydown"
1038 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1039 .
"|onmouseup|src|style|title|usemap|vspace|width]");
1042 array_push($valid_elements,
"input[accept|accesskey|align<bottom?left?middle?right?top|alt"
1043 .
"|checked<checked|class|dir<ltr?rtl|disabled<disabled|id|ismap<ismap|lang"
1044 .
"|maxlength|name|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress"
1045 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onselect"
1046 .
"|readonly<readonly|size|src|style|tabindex|title"
1047 .
"|type<button?checkbox?file?hidden?image?password?radio?reset?submit?text"
1051 array_push($valid_elements,
"ins[cite|class|datetime|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
1052 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1053 .
"|onmouseup|style|title]");
1056 array_push($valid_elements,
"isindex[class|dir<ltr?rtl|id|lang|prompt|style|title]");
1059 array_push($valid_elements,
"kbd[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1060 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1064 array_push($valid_elements,
"label[accesskey|class|dir<ltr?rtl|for|id|lang|onblur|onclick|ondblclick"
1065 .
"|onfocus|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout"
1066 .
"|onmouseover|onmouseup|style|title]");
1069 array_push($valid_elements,
"legend[align<bottom?left?right?top|accesskey|class|dir<ltr?rtl|id|lang"
1070 .
"|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1071 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1074 array_push($valid_elements,
"li[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
1075 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title|type"
1079 array_push($valid_elements,
"link[charset|class|dir<ltr?rtl|href|hreflang|id|lang|media|onclick"
1080 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1081 .
"|onmouseout|onmouseover|onmouseup|rel|rev|style|title|target|type]");
1084 array_push($valid_elements,
"map[class|dir<ltr?rtl|id|lang|name|onclick|ondblclick|onkeydown|onkeypress"
1085 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1089 array_push($valid_elements,
"menu[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
1090 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1091 .
"|onmouseup|style|title]");
1094 array_push($valid_elements,
"meta[content|dir<ltr?rtl|http-equiv|lang|name|scheme]");
1097 array_push($valid_elements,
"noframes[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1098 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1102 array_push($valid_elements,
"noscript[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1103 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1107 array_push($valid_elements,
"object[align<bottom?left?middle?right?top|archive|border|class|classid"
1108 .
"|codebase|codetype|data|declare|dir<ltr?rtl|height|hspace|id|lang|name"
1109 .
"|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1110 .
"|onmouseout|onmouseover|onmouseup|standby|style|tabindex|title|type|usemap"
1114 array_push($valid_elements,
"ol[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
1115 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1116 .
"|onmouseup|start|style|title|type]");
1119 array_push($valid_elements,
"optgroup[class|dir<ltr?rtl|disabled<disabled|id|label|lang|onclick"
1120 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1121 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1124 array_push($valid_elements,
"option[class|dir<ltr?rtl|disabled<disabled|id|label|lang|onclick|ondblclick"
1125 .
"|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout"
1126 .
"|onmouseover|onmouseup|selected<selected|style|title|value]");
1129 array_push($valid_elements,
"p[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
1130 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1131 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1134 array_push($valid_elements,
"param[id|name|type|value|valuetype<DATA?OBJECT?REF]");
1140 array_push($valid_elements,
"pre/listing/plaintext/xmp[align|class|dir<ltr?rtl|id|lang|onclick|ondblclick"
1141 .
"|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout"
1142 .
"|onmouseover|onmouseup|style|title|width]");
1145 array_push($valid_elements,
"q[cite|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1146 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1150 array_push($valid_elements,
"s[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
1151 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
1154 array_push($valid_elements,
"samp[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1155 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1159 array_push($valid_elements,
"script[charset|defer|language|src|type]");
1162 array_push($valid_elements,
"select[class|dir<ltr?rtl|disabled<disabled|id|lang|multiple<multiple|name"
1163 .
"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup"
1164 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|size|style"
1165 .
"|tabindex|title]");
1168 array_push($valid_elements,
"small[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1169 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1173 array_push($valid_elements,
"span[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
1174 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1175 .
"|onmouseup|style|title]");
1178 array_push($valid_elements,
"strike[class|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
1179 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1180 .
"|onmouseup|style|title]");
1183 array_push($valid_elements,
"strong/b[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1184 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1188 array_push($valid_elements,
"style[dir<ltr?rtl|lang|media|title|type]");
1191 array_push($valid_elements,
"sub[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1192 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1196 array_push($valid_elements,
"sup[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1197 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1201 array_push($valid_elements,
"table[align<center?left?right|bgcolor|border|cellpadding|cellspacing|class"
1202 .
"|dir<ltr?rtl|frame|height|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1203 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|rules"
1204 .
"|style|summary|title|width]");
1207 array_push($valid_elements,
"tbody[align<center?char?justify?left?right|char|class|charoff|dir<ltr?rtl|id"
1208 .
"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
1209 .
"|onmousemove|onmouseout|onmouseover|onmouseup|style|title"
1210 .
"|valign<baseline?bottom?middle?top]");
1213 array_push($valid_elements,
"td[abbr|align<center?char?justify?left?right|axis|bgcolor|char|charoff|class"
1214 .
"|colspan|dir<ltr?rtl|headers|height|id|lang|nowrap<nowrap|onclick"
1215 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1216 .
"|onmouseout|onmouseover|onmouseup|rowspan|scope<col?colgroup?row?rowgroup"
1217 .
"|style|title|valign<baseline?bottom?middle?top|width]");
1220 array_push($valid_elements,
"textarea[accesskey|class|cols|dir<ltr?rtl|disabled<disabled|id|lang|name"
1221 .
"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup"
1222 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onselect"
1223 .
"|readonly<readonly|rows|style|tabindex|title]");
1226 array_push($valid_elements,
"tfoot[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id"
1227 .
"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
1228 .
"|onmousemove|onmouseout|onmouseover|onmouseup|style|title"
1229 .
"|valign<baseline?bottom?middle?top]");
1232 array_push($valid_elements,
"th[abbr|align<center?char?justify?left?right|axis|bgcolor|char|charoff|class"
1233 .
"|colspan|dir<ltr?rtl|headers|height|id|lang|nowrap<nowrap|onclick"
1234 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1235 .
"|onmouseout|onmouseover|onmouseup|rowspan|scope<col?colgroup?row?rowgroup"
1236 .
"|style|title|valign<baseline?bottom?middle?top|width]");
1239 array_push($valid_elements,
"thead[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id"
1240 .
"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
1241 .
"|onmousemove|onmouseout|onmouseover|onmouseup|style|title"
1242 .
"|valign<baseline?bottom?middle?top]");
1245 array_push($valid_elements,
"title[dir<ltr?rtl|lang]");
1248 array_push($valid_elements,
"tr[abbr|align<center?char?justify?left?right|bgcolor|char|charoff|class"
1249 .
"|rowspan|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1250 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1251 .
"|title|valign<baseline?bottom?middle?top]");
1254 array_push($valid_elements,
"tt[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
1255 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
1258 array_push($valid_elements,
"u[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
1259 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
1263 array_push($valid_elements,
"span[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
1264 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1265 .
"|onmouseup|style|title]");
1268 array_push($valid_elements,
"ul[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
1269 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1270 .
"|onmouseup|style|title|type]");
1273 array_push($valid_elements,
"var[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1274 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1279 return join(
",", $valid_elements);
1291 $this->root_block_element = $a_root_block_element;
1316 if(is_array($a_button))
1318 $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, $a_button));
1322 $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, array($a_button)));
1340 return implode(
',', $this->disabled_buttons);
1359 while(strpos($a_string,
'separator,separator') !==
false)
1361 $a_string = str_replace(
'separator,separator',
'separator', $a_string);
1364 while(strpos($a_string,
',,') !==
false)
1366 $a_string = str_replace(
',,',
',', $a_string);
1369 if($a_string{0} ==
',')
1371 $a_string = (string)substr($a_string, 1);
1374 if(strlen($a_string) && $a_string{strlen($a_string) - 1} ==
',')
1376 $a_string = substr($a_string, 0, strlen($a_string) - 1);