24 include_once
"./Services/RTE/classes/class.ilRTE.php";
53 $a_version =
"3.5.11";
62 $this->version = $a_version;
63 $this->
vd =
"_".str_replace(
".",
"_", $a_version);
71 $this->plugins = array(
95 $this->addInternalTinyMCEImageManager();
101 public function addInternalTinyMCEImageManager()
106 global $ilClientIniFile;
108 if(!$ilClientIniFile->readVariable(
'tinymce',
'use_advanced_img_mng'))
137 if(!in_array(
'img', $tags))
156 $this->addInternalTinyMCEImageManager();
159 protected function handleIliasImageManagerRemoved()
164 global $ilClientIniFile;
166 if(!$ilClientIniFile->readVariable(
'tinymce',
'use_advanced_img_mng'))
183 if(self::ILIAS_IMG_MANAGER_PLUGIN == $a_plugin_name)
198 if(self::ILIAS_IMG_MANAGER_PLUGIN == $a_plugin_name)
200 $this->handleIliasImageManagerRemoved();
277 function addRTESupport($obj_id, $obj_type, $a_module =
"", $allowFormElements = FALSE, $cfg_template = null, $hide_switch =
false)
281 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
289 if($ilBrowser->isMobile())
298 include_once
"./Services/UICore/classes/class.ilTemplate.php";
301 $tpl =
new ilTemplate(($cfg_template === null ?
"tpl.tinymce.html" : $cfg_template),
true,
true,
"Services/RTE");
305 if ($allowFormElements)
307 $tpl->touchBlock(
"formelements");
311 $tpl->setCurrentBlock(
"initial_width");
313 $tpl->parseCurrentBlock();
315 $tpl->setCurrentBlock(
"tinymce");
316 $tpl->setVariable(
"JAVASCRIPT_LOCATION",
"./Services/RTE/tiny_mce".$this->
vd.
"/tiny_mce.js");
317 include_once
"./Services/Object/classes/class.ilObject.php";
318 $tpl->setVariable(
"OBJ_ID", $obj_id);
319 $tpl->setVariable(
"OBJ_TYPE", $obj_type);
320 $tpl->setVariable(
"CLIENT_ID", CLIENT_ID);
327 .
','.$this->_buildAdvancedTableButtonsFromHTMLTags($tags)
330 $tpl->setVariable(
'BUTTONS_1', self::_removeRedundantSeparators($buttons_1));
331 $tpl->setVariable(
'BUTTONS_2', self::_removeRedundantSeparators($buttons_2));
332 $tpl->setVariable(
'BUTTONS_3', self::_removeRedundantSeparators($buttons_3));
334 $tpl->setVariable(
"ADDITIONAL_PLUGINS", join(
",", $this->plugins));
335 include_once
"./Services/Utilities/classes/class.ilUtil.php";
345 $tpl->parseCurrentBlock();
347 $this->tpl->setVariable(
"CONTENT_BLOCK",
$tpl->get());
373 $tpl->touchBlock(remove_img_context_menu_item);
387 include_once
"./Services/UICore/classes/class.ilTemplate.php";
388 $tpl =
new ilTemplate(
"tpl.tinymce.html",
true,
true,
"Services/RTE");
390 $tpl->setCurrentBlock(
"tinymce");
391 $tpl->setVariable(
"JAVASCRIPT_LOCATION",
"./Services/RTE/tiny_mce".$this->
vd.
"/tiny_mce.js");
392 include_once
"./Services/Object/classes/class.ilObject.php";
393 $tpl->setVariable(
"OBJ_ID", $obj_id);
394 $tpl->setVariable(
"OBJ_TYPE", $obj_type);
395 $tpl->setVariable(
"CLIENT_ID", CLIENT_ID);
403 .
','.$this->_buildAdvancedTableButtonsFromHTMLTags($tags)
406 $tpl->setVariable(
'BUTTONS_1', self::_removeRedundantSeparators($buttons_1));
407 $tpl->setVariable(
'BUTTONS_2', self::_removeRedundantSeparators($buttons_2));
408 $tpl->setVariable(
'BUTTONS_3', self::_removeRedundantSeparators($buttons_3));
410 $tpl->setVariable(
"ADDITIONAL_PLUGINS", join(
",", $this->plugins));
411 include_once
"./Services/Utilities/classes/class.ilUtil.php";
421 $tpl->parseCurrentBlock();
422 $this->tpl->setVariable(
"CONTENT_BLOCK",
$tpl->get());
435 $validtags = array(
"strong",
"em",
"p",
"br",
"div",
"span");
436 $buttontags = array(
"strong",
"em");
437 include_once
"./Services/UICore/classes/class.ilTemplate.php";
438 $template =
new ilTemplate(
"tpl.usereditor.html",
true,
true,
"Services/RTE");
440 $template->setCurrentBlock(
"tinymce");
441 $template->setVariable(
"JAVASCRIPT_LOCATION",
"./Services/RTE/tiny_mce".$this->
vd.
"/tiny_mce.js");
442 include_once
"./Services/Object/classes/class.ilObject.php";
443 $template->setVariable(
"SELECTOR", $editor_selector);
444 $template->setVariable(
"BLOCKFORMATS",
"");
448 $template->setVariable(
"STYLE_SELECT",
",styleselect");
451 include_once
"./Services/Utilities/classes/class.ilUtil.php";
455 $template->parseCurrentBlock();
456 $this->tpl->setCurrentBlock(
"HeadContent");
457 $this->tpl->setVariable(
"CONTENT_BLOCK", $template->get());
458 $this->tpl->parseCurrentBlock();
465 $btns = explode(
',', $btns);
470 return implode(
',', $btns);
480 $this->styleselect = $a_styleselect;
490 return $this->styleselect;
496 $blockformats = array();
498 if (in_array(
"p", $a_html_tags))
500 array_push($blockformats,
"p");
502 if (in_array(
"div", $a_html_tags))
504 array_push($blockformats,
"div");
506 if (in_array(
"pre", $a_html_tags))
508 array_push($blockformats,
"pre");
510 if (in_array(
"code", $a_html_tags))
512 array_push($blockformats,
"code");
514 if (in_array(
"h1", $a_html_tags))
516 array_push($blockformats,
"h1");
518 if (in_array(
"h2", $a_html_tags))
520 array_push($blockformats,
"h2");
522 if (in_array(
"h3", $a_html_tags))
524 array_push($blockformats,
"h3");
526 if (in_array(
"h4", $a_html_tags))
528 array_push($blockformats,
"h4");
530 if (in_array(
"h5", $a_html_tags))
532 array_push($blockformats,
"h5");
534 if (in_array(
"h6", $a_html_tags))
536 array_push($blockformats,
"h6");
538 if (count($blockformats))
540 return join(
",", $blockformats);
550 $theme_advanced_buttons = array();
552 if($a_buttons_section == 1)
554 if (in_array(
"strong", $a_html_tags))
556 array_push($theme_advanced_buttons,
"bold");
558 if (in_array(
"em", $a_html_tags))
560 array_push($theme_advanced_buttons,
"italic");
562 if (in_array(
"u", $a_html_tags))
564 array_push($theme_advanced_buttons,
"underline");
566 if (in_array(
"strike", $a_html_tags))
568 array_push($theme_advanced_buttons,
"strikethrough");
570 if (count($theme_advanced_buttons))
572 array_push($theme_advanced_buttons,
"separator");
574 if (in_array(
"p", $a_html_tags))
576 array_push($theme_advanced_buttons,
"justifyleft");
577 array_push($theme_advanced_buttons,
"justifycenter");
578 array_push($theme_advanced_buttons,
"justifyright");
579 array_push($theme_advanced_buttons,
"justifyfull");
580 array_push($theme_advanced_buttons,
"separator");
584 array_push($theme_advanced_buttons,
"formatselect");
586 if (in_array(
"hr", $a_html_tags))
588 array_push($theme_advanced_buttons,
"hr");
590 array_push($theme_advanced_buttons,
"removeformat");
591 array_push($theme_advanced_buttons,
"separator");
592 if (in_array(
"sub", $a_html_tags))
594 array_push($theme_advanced_buttons,
"sub");
596 if (in_array(
"sup", $a_html_tags))
598 array_push($theme_advanced_buttons,
"sup");
600 if (in_array(
"font", $a_html_tags))
602 array_push($theme_advanced_buttons,
"fontselect");
603 array_push($theme_advanced_buttons,
"fontsizeselect");
605 array_push($theme_advanced_buttons,
"charmap");
606 if ((in_array(
"ol", $a_html_tags)) && (in_array(
"li", $a_html_tags)))
608 array_push($theme_advanced_buttons,
"bullist");
610 if ((in_array(
"ul", $a_html_tags)) && (in_array(
"li", $a_html_tags)))
612 array_push($theme_advanced_buttons,
"numlist");
614 array_push($theme_advanced_buttons,
"separator");
615 if (in_array(
"cite", $a_html_tags))
617 array_push($theme_advanced_buttons,
"cite");
619 if (in_array(
"abbr", $a_html_tags))
621 array_push($theme_advanced_buttons,
"abbr");
623 if (in_array(
"acronym", $a_html_tags))
625 array_push($theme_advanced_buttons,
"acronym");
627 if (in_array(
"del", $a_html_tags))
629 array_push($theme_advanced_buttons,
"del");
631 if (in_array(
"ins", $a_html_tags))
633 array_push($theme_advanced_buttons,
"ins");
635 if (in_array(
"blockquote", $a_html_tags))
637 array_push($theme_advanced_buttons,
"indent");
638 array_push($theme_advanced_buttons,
"outdent");
640 if (in_array(
"img", $a_html_tags))
643 array_push($theme_advanced_buttons,
"image");
644 array_push($theme_advanced_buttons,
"ibrowser");
645 array_push($theme_advanced_buttons,
"ilimgupload");
647 if (in_array(
"a", $a_html_tags))
649 array_push($theme_advanced_buttons,
"link");
650 array_push($theme_advanced_buttons,
"unlink");
651 array_push($theme_advanced_buttons,
"anchor");
653 array_push($theme_advanced_buttons,
"separator");
654 array_push($theme_advanced_buttons,
"undo");
655 array_push($theme_advanced_buttons,
"redo");
657 if(is_array($this->buttons) && count($this->buttons))
659 array_push($theme_advanced_buttons,
"separator");
660 foreach($this->buttons as $button)
662 array_push($theme_advanced_buttons, $button);
666 array_push($theme_advanced_buttons,
"code");
667 array_push($theme_advanced_buttons,
"fullscreen");
670 array_push($theme_advanced_buttons,
"pasteword");
672 else if($a_buttons_section == 2)
674 array_push($theme_advanced_buttons,
"cut");
675 array_push($theme_advanced_buttons,
"copy");
676 array_push($theme_advanced_buttons,
"paste");
677 array_push($theme_advanced_buttons,
"pastetext");
681 else if($a_buttons_section == 3)
686 if (is_array($remove_buttons))
688 foreach ($remove_buttons as $buttontext)
690 if ((
$res = array_search($buttontext, $theme_advanced_buttons)) !== FALSE)
692 unset($theme_advanced_buttons[
$res]);
697 return join(
",", $theme_advanced_buttons);
702 $theme_advanced_buttons = array();
703 if (in_array(
"strong", $a_html_tags))
705 array_push($theme_advanced_buttons,
"bold");
707 if (in_array(
"em", $a_html_tags))
709 array_push($theme_advanced_buttons,
"italic");
711 if (in_array(
"u", $a_html_tags))
713 array_push($theme_advanced_buttons,
"underline");
715 if (in_array(
"strike", $a_html_tags))
717 array_push($theme_advanced_buttons,
"strikethrough");
719 if (in_array(
"p", $a_html_tags))
721 array_push($theme_advanced_buttons,
"justifyleft");
722 array_push($theme_advanced_buttons,
"justifycenter");
723 array_push($theme_advanced_buttons,
"justifyright");
724 array_push($theme_advanced_buttons,
"justifyfull");
728 array_push($theme_advanced_buttons,
"formatselect");
730 if (in_array(
"hr", $a_html_tags))
732 array_push($theme_advanced_buttons,
"hr");
734 if (in_array(
"sub", $a_html_tags))
736 array_push($theme_advanced_buttons,
"sub");
738 if (in_array(
"sup", $a_html_tags))
740 array_push($theme_advanced_buttons,
"sup");
742 if (in_array(
"font", $a_html_tags))
744 array_push($theme_advanced_buttons,
"fontselect");
745 array_push($theme_advanced_buttons,
"fontsizeselect");
747 if ((in_array(
"ol", $a_html_tags)) && (in_array(
"li", $a_html_tags)))
749 array_push($theme_advanced_buttons,
"bullist");
751 if ((in_array(
"ul", $a_html_tags)) && (in_array(
"li", $a_html_tags)))
753 array_push($theme_advanced_buttons,
"numlist");
755 if (in_array(
"cite", $a_html_tags))
757 array_push($theme_advanced_buttons,
"cite");
759 if (in_array(
"abbr", $a_html_tags))
761 array_push($theme_advanced_buttons,
"abbr");
763 if (in_array(
"acronym", $a_html_tags))
765 array_push($theme_advanced_buttons,
"acronym");
767 if (in_array(
"del", $a_html_tags))
769 array_push($theme_advanced_buttons,
"del");
771 if (in_array(
"ins", $a_html_tags))
773 array_push($theme_advanced_buttons,
"ins");
775 if (in_array(
"blockquote", $a_html_tags))
777 array_push($theme_advanced_buttons,
"indent");
778 array_push($theme_advanced_buttons,
"outdent");
780 if (in_array(
"img", $a_html_tags))
783 array_push($theme_advanced_buttons,
"image");
784 array_push($theme_advanced_buttons,
"ibrowser");
785 array_push($theme_advanced_buttons,
"ilimgupload");
787 if (in_array(
"a", $a_html_tags))
789 array_push($theme_advanced_buttons,
"link");
790 array_push($theme_advanced_buttons,
"unlink");
791 array_push($theme_advanced_buttons,
"anchor");
795 if (is_array($remove_buttons))
797 foreach ($remove_buttons as $buttontext)
799 if ((
$res = array_search($buttontext, $theme_advanced_buttons)) !== FALSE)
801 unset($theme_advanced_buttons[
$res]);
806 return join(
",", $theme_advanced_buttons);
811 $theme_advanced_buttons = array();
812 if (in_array(
"table", $a_html_tags) && in_array(
"tr", $a_html_tags) && in_array(
"td", $a_html_tags))
814 array_push($theme_advanced_buttons,
"tablecontrols");
818 if (is_array($remove_buttons))
820 foreach ($remove_buttons as $buttontext)
822 if ((
$res = array_search($buttontext, $theme_advanced_buttons)) !== FALSE)
824 unset($theme_advanced_buttons[
$res]);
829 return join(
",", $theme_advanced_buttons);
835 $lang = $ilUser->getLanguage();
836 if (file_exists(
"./Services/RTE/tiny_mce".$this->
vd.
"/langs/$lang.js"))
848 $valid_elements = array();
849 foreach ($a_html_tags as $tag)
854 array_push($valid_elements,
"a[accesskey|charset|class|coords|dir<ltr?rtl|href|hreflang|id|lang|name"
855 .
"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup"
856 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|rel|rev"
857 .
"|shape<circle?default?poly?rect|style|tabindex|title|target|type]");
860 array_push($valid_elements,
"abbr[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
861 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
865 array_push($valid_elements,
"acronym[class|dir<ltr?rtl|id|id|lang|onclick|ondblclick|onkeydown|onkeypress"
866 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
870 array_push($valid_elements,
"address[class|align|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
871 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
872 .
"|onmouseup|style|title]");
875 array_push($valid_elements,
"applet[align<bottom?left?middle?right?top|alt|archive|class|code|codebase"
876 .
"|height|hspace|id|name|object|style|title|vspace|width]");
879 array_push($valid_elements,
"area[accesskey|alt|class|coords|dir<ltr?rtl|href|id|lang|nohref<nohref"
880 .
"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup"
881 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup"
882 .
"|shape<circle?default?poly?rect|style|tabindex|title|target]");
885 array_push($valid_elements,
"base[href|target]");
888 array_push($valid_elements,
"basefont[color|face|id|size]");
891 array_push($valid_elements,
"bdo[class|dir<ltr?rtl|id|lang|style|title]");
894 array_push($valid_elements,
"big[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
895 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
899 array_push($valid_elements,
"blockquote[dir|style|cite|class|dir<ltr?rtl|id|lang|onclick|ondblclick"
900 .
"|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout"
901 .
"|onmouseover|onmouseup|style|title]");
904 array_push($valid_elements,
"body[alink|background|bgcolor|class|dir<ltr?rtl|id|lang|link|onclick"
905 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onload|onmousedown|onmousemove"
906 .
"|onmouseout|onmouseover|onmouseup|onunload|style|title|text|vlink]");
909 array_push($valid_elements,
"br[class|clear<all?left?none?right|id|style|title]");
912 array_push($valid_elements,
"button[accesskey|class|dir<ltr?rtl|disabled<disabled|id|lang|name|onblur"
913 .
"|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onmousedown"
914 .
"|onmousemove|onmouseout|onmouseover|onmouseup|style|tabindex|title|type"
918 array_push($valid_elements,
"caption[align<bottom?left?right?top|class|dir<ltr?rtl|id|lang|onclick"
919 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
920 .
"|onmouseout|onmouseover|onmouseup|style|title]");
923 array_push($valid_elements,
"center[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
924 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
928 array_push($valid_elements,
"cite[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
929 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
933 array_push($valid_elements,
"code[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
934 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
938 array_push($valid_elements,
"col[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id"
939 .
"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
940 .
"|onmousemove|onmouseout|onmouseover|onmouseup|span|style|title"
941 .
"|valign<baseline?bottom?middle?top|width]");
944 array_push($valid_elements,
"colgroup[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl"
945 .
"|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
946 .
"|onmousemove|onmouseout|onmouseover|onmouseup|span|style|title"
947 .
"|valign<baseline?bottom?middle?top|width]");
950 array_push($valid_elements,
"dd[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
951 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
954 array_push($valid_elements,
"del[cite|class|datetime|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
955 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
956 .
"|onmouseup|style|title]");
959 array_push($valid_elements,
"dfn[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
960 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
964 array_push($valid_elements,
"dir[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
965 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
966 .
"|onmouseup|style|title]");
969 array_push($valid_elements,
"div[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
970 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
971 .
"|onmouseout|onmouseover|onmouseup|style|title]");
974 array_push($valid_elements,
"dl[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
975 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
976 .
"|onmouseup|style|title]");
979 array_push($valid_elements,
"dt[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
980 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
983 array_push($valid_elements,
"em/i[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
984 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
988 array_push($valid_elements,
"fieldset[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
989 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
993 array_push($valid_elements,
"font[class|color|dir<ltr?rtl|face|id|lang|size|style|title]");
996 array_push($valid_elements,
"form[accept|accept-charset|action|class|dir<ltr?rtl|enctype|id|lang"
997 .
"|method<get?post|name|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
998 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onreset|onsubmit"
999 .
"|style|title|target]");
1002 array_push($valid_elements,
"frame[class|frameborder|id|longdesc|marginheight|marginwidth|name"
1003 .
"|noresize<noresize|scrolling<auto?no?yes|src|style|title]");
1006 array_push($valid_elements,
"frameset[class|cols|id|onload|onunload|rows|style|title]");
1009 array_push($valid_elements,
"h1[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
1010 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1011 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1014 array_push($valid_elements,
"h2[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
1015 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1016 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1019 array_push($valid_elements,
"h3[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
1020 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1021 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1024 array_push($valid_elements,
"h4[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
1025 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1026 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1029 array_push($valid_elements,
"h5[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
1030 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1031 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1034 array_push($valid_elements,
"h6[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
1035 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1036 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1039 array_push($valid_elements,
"head[dir<ltr?rtl|lang|profile]");
1042 array_push($valid_elements,
"hr[align<center?left?right|class|dir<ltr?rtl|id|lang|noshade<noshade|onclick"
1043 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1044 .
"|onmouseout|onmouseover|onmouseup|size|style|title|width]");
1047 array_push($valid_elements,
"html[dir<ltr?rtl|lang|version]");
1050 array_push($valid_elements,
"iframe[align<bottom?left?middle?right?top|class|frameborder|height|id"
1051 .
"|longdesc|marginheight|marginwidth|name|scrolling<auto?no?yes|src|style"
1055 array_push($valid_elements,
"img[align<bottom?left?middle?right?top|alt|border|class|dir<ltr?rtl|height"
1056 .
"|hspace|id|ismap<ismap|lang|longdesc|name|onclick|ondblclick|onkeydown"
1057 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1058 .
"|onmouseup|src|style|title|usemap|vspace|width]");
1061 array_push($valid_elements,
"input[accept|accesskey|align<bottom?left?middle?right?top|alt"
1062 .
"|checked<checked|class|dir<ltr?rtl|disabled<disabled|id|ismap<ismap|lang"
1063 .
"|maxlength|name|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress"
1064 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onselect"
1065 .
"|readonly<readonly|size|src|style|tabindex|title"
1066 .
"|type<button?checkbox?file?hidden?image?password?radio?reset?submit?text"
1070 array_push($valid_elements,
"ins[cite|class|datetime|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
1071 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1072 .
"|onmouseup|style|title]");
1075 array_push($valid_elements,
"isindex[class|dir<ltr?rtl|id|lang|prompt|style|title]");
1078 array_push($valid_elements,
"kbd[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1079 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1083 array_push($valid_elements,
"label[accesskey|class|dir<ltr?rtl|for|id|lang|onblur|onclick|ondblclick"
1084 .
"|onfocus|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout"
1085 .
"|onmouseover|onmouseup|style|title]");
1088 array_push($valid_elements,
"legend[align<bottom?left?right?top|accesskey|class|dir<ltr?rtl|id|lang"
1089 .
"|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1090 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1093 array_push($valid_elements,
"li[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
1094 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title|type"
1098 array_push($valid_elements,
"link[charset|class|dir<ltr?rtl|href|hreflang|id|lang|media|onclick"
1099 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1100 .
"|onmouseout|onmouseover|onmouseup|rel|rev|style|title|target|type]");
1103 array_push($valid_elements,
"map[class|dir<ltr?rtl|id|lang|name|onclick|ondblclick|onkeydown|onkeypress"
1104 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1108 array_push($valid_elements,
"menu[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
1109 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1110 .
"|onmouseup|style|title]");
1113 array_push($valid_elements,
"meta[content|dir<ltr?rtl|http-equiv|lang|name|scheme]");
1116 array_push($valid_elements,
"noframes[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1117 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1121 array_push($valid_elements,
"noscript[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1122 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1126 array_push($valid_elements,
"object[align<bottom?left?middle?right?top|archive|border|class|classid"
1127 .
"|codebase|codetype|data|declare|dir<ltr?rtl|height|hspace|id|lang|name"
1128 .
"|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1129 .
"|onmouseout|onmouseover|onmouseup|standby|style|tabindex|title|type|usemap"
1133 array_push($valid_elements,
"ol[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
1134 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1135 .
"|onmouseup|start|style|title|type]");
1138 array_push($valid_elements,
"optgroup[class|dir<ltr?rtl|disabled<disabled|id|label|lang|onclick"
1139 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1140 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1143 array_push($valid_elements,
"option[class|dir<ltr?rtl|disabled<disabled|id|label|lang|onclick|ondblclick"
1144 .
"|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout"
1145 .
"|onmouseover|onmouseup|selected<selected|style|title|value]");
1148 array_push($valid_elements,
"p[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick"
1149 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1150 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1153 array_push($valid_elements,
"param[id|name|type|value|valuetype<DATA?OBJECT?REF]");
1159 array_push($valid_elements,
"pre/listing/plaintext/xmp[align|class|dir<ltr?rtl|id|lang|onclick|ondblclick"
1160 .
"|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout"
1161 .
"|onmouseover|onmouseup|style|title|width]");
1164 array_push($valid_elements,
"q[cite|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1165 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1169 array_push($valid_elements,
"s[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
1170 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
1173 array_push($valid_elements,
"samp[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1174 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1178 array_push($valid_elements,
"script[charset|defer|language|src|type]");
1181 array_push($valid_elements,
"select[class|dir<ltr?rtl|disabled<disabled|id|lang|multiple<multiple|name"
1182 .
"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup"
1183 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|size|style"
1184 .
"|tabindex|title]");
1187 array_push($valid_elements,
"small[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1188 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1192 array_push($valid_elements,
"span[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
1193 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1194 .
"|onmouseup|style|title]");
1197 array_push($valid_elements,
"strike[class|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
1198 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1199 .
"|onmouseup|style|title]");
1202 array_push($valid_elements,
"strong/b[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1203 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1207 array_push($valid_elements,
"style[dir<ltr?rtl|lang|media|title|type]");
1210 array_push($valid_elements,
"sub[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1211 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1215 array_push($valid_elements,
"sup[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1216 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1220 array_push($valid_elements,
"table[align<center?left?right|bgcolor|border|cellpadding|cellspacing|class"
1221 .
"|dir<ltr?rtl|frame|height|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1222 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|rules"
1223 .
"|style|summary|title|width]");
1226 array_push($valid_elements,
"tbody[align<center?char?justify?left?right|char|class|charoff|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,
"td[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,
"textarea[accesskey|class|cols|dir<ltr?rtl|disabled<disabled|id|lang|name"
1240 .
"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup"
1241 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onselect"
1242 .
"|readonly<readonly|rows|style|tabindex|title]");
1245 array_push($valid_elements,
"tfoot[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id"
1246 .
"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
1247 .
"|onmousemove|onmouseout|onmouseover|onmouseup|style|title"
1248 .
"|valign<baseline?bottom?middle?top]");
1251 array_push($valid_elements,
"th[abbr|align<center?char?justify?left?right|axis|bgcolor|char|charoff|class"
1252 .
"|colspan|dir<ltr?rtl|headers|height|id|lang|nowrap<nowrap|onclick"
1253 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove"
1254 .
"|onmouseout|onmouseover|onmouseup|rowspan|scope<col?colgroup?row?rowgroup"
1255 .
"|style|title|valign<baseline?bottom?middle?top|width]");
1258 array_push($valid_elements,
"thead[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id"
1259 .
"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown"
1260 .
"|onmousemove|onmouseout|onmouseover|onmouseup|style|title"
1261 .
"|valign<baseline?bottom?middle?top]");
1264 array_push($valid_elements,
"title[dir<ltr?rtl|lang]");
1267 array_push($valid_elements,
"tr[abbr|align<center?char?justify?left?right|bgcolor|char|charoff|class"
1268 .
"|rowspan|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1269 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1270 .
"|title|valign<baseline?bottom?middle?top]");
1273 array_push($valid_elements,
"tt[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
1274 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
1277 array_push($valid_elements,
"u[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup"
1278 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
1282 array_push($valid_elements,
"span[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
1283 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1284 .
"|onmouseup|style|title]");
1287 array_push($valid_elements,
"ul[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown"
1288 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover"
1289 .
"|onmouseup|style|title|type]");
1292 array_push($valid_elements,
"var[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress"
1293 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style"
1298 return join(
",", $valid_elements);
1310 $this->root_block_element = $a_root_block_element;
1335 if(is_array($a_button))
1337 $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, $a_button));
1341 $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, array($a_button)));
1359 return implode(
',', $this->disabled_buttons);
1378 while(strpos($a_string,
'separator,separator') !==
false)
1380 $a_string = str_replace(
'separator,separator',
'separator', $a_string);
1383 while(strpos($a_string,
',,') !==
false)
1385 $a_string = str_replace(
',,',
',', $a_string);
1388 if($a_string{0} ==
',')
1390 $a_string = (string)substr($a_string, 1);
1393 if(strlen($a_string) && $a_string{strlen($a_string) - 1} ==
',')
1395 $a_string = substr($a_string, 0, strlen($a_string) - 1);