4 require_once
'Services/RTE/classes/class.ilRTE.php';
39 $a_version =
'3.5.11';
42 parent::__construct($a_version);
48 $this->version = $a_version;
49 $this->
vd =
'_' . str_replace(
'.',
'_', $a_version);
57 $this->plugins =
array(
89 if(!$this->client_init->readVariable(
'tinymce',
'use_advanced_img_mng'))
91 parent::addPlugin(
'ilimgupload');
92 parent::addButton(
'ilimgupload');
93 parent::removePlugin(
'ibrowser');
94 parent::removePlugin(
'image');
105 parent::addPlugin(
'ibrowser');
106 parent::removePlugin(
'ilimgupload');
118 if(!in_array(
'img', $tags))
121 parent::removePlugin(
'ilimgupload');
122 parent::removePlugin(
'ibrowser');
123 parent::removePlugin(
'image');
142 if(!$this->client_init->readVariable(
'tinymce',
'use_advanced_img_mng'))
144 parent::removePlugin(
'ilimgupload');
149 parent::removePlugin(
'ibrowser');
159 if(self::ILIAS_IMG_MANAGER_PLUGIN == $a_plugin_name)
165 parent::addPlugin($a_plugin_name);
174 if(self::ILIAS_IMG_MANAGER_PLUGIN == $a_plugin_name)
180 parent::removePlugin($a_plugin_name);
187 public function addRTESupport($obj_id, $obj_type, $a_module =
"", $allowFormElements = FALSE, $cfg_template = null, $hide_switch =
false)
189 if($this->browser->isMobile())
198 include_once
"./Services/UICore/classes/class.ilTemplate.php";
201 $tpl =
new ilTemplate(($cfg_template === null ?
"tpl.tinymce.html" : $cfg_template),
true,
true,
"Services/RTE");
205 if ($allowFormElements)
207 $tpl->touchBlock(
"formelements");
211 $tpl->setCurrentBlock(
"initial_width");
213 $tpl->parseCurrentBlock();
215 $tpl->setCurrentBlock(
"tinymce");
216 $tpl->setVariable(
"JAVASCRIPT_LOCATION",
"./Services/RTE/tiny_mce".$this->
vd.
"/tiny_mce.js");
217 include_once
"./Services/Object/classes/class.ilObject.php";
218 $tpl->setVariable(
"OBJ_ID", $obj_id);
219 $tpl->setVariable(
"OBJ_TYPE", $obj_type);
220 $tpl->setVariable(
"CLIENT_ID", CLIENT_ID);
227 .
','.$this->_buildAdvancedTableButtonsFromHTMLTags($tags)
230 $tpl->setVariable(
'BUTTONS_1', self::removeRedundantSeparators($buttons_1));
231 $tpl->setVariable(
'BUTTONS_2', self::removeRedundantSeparators($buttons_2));
232 $tpl->setVariable(
'BUTTONS_3', self::removeRedundantSeparators($buttons_3));
234 $tpl->setVariable(
"ADDITIONAL_PLUGINS", join(
",", $this->plugins));
235 include_once
"./Services/Utilities/classes/class.ilUtil.php";
245 $tpl->parseCurrentBlock();
247 $this->tpl->setVariable(
"CONTENT_BLOCK",
$tpl->get());
258 $tpl->
touchBlock(
'remove_img_context_menu_item');
268 include_once
"./Services/UICore/classes/class.ilTemplate.php";
269 $tpl =
new ilTemplate(
"tpl.tinymce.html",
true,
true,
"Services/RTE");
271 $tpl->setCurrentBlock(
"tinymce");
272 $tpl->setVariable(
"JAVASCRIPT_LOCATION",
"./Services/RTE/tiny_mce".$this->
vd.
"/tiny_mce.js");
273 include_once
"./Services/Object/classes/class.ilObject.php";
274 $tpl->setVariable(
"OBJ_ID", $obj_id);
275 $tpl->setVariable(
"OBJ_TYPE", $obj_type);
276 $tpl->setVariable(
"CLIENT_ID", CLIENT_ID);
284 .
','.$this->_buildAdvancedTableButtonsFromHTMLTags($tags)
287 $tpl->setVariable(
'BUTTONS_1', self::removeRedundantSeparators($buttons_1));
288 $tpl->setVariable(
'BUTTONS_2', self::removeRedundantSeparators($buttons_2));
289 $tpl->setVariable(
'BUTTONS_3', self::removeRedundantSeparators($buttons_3));
291 $tpl->setVariable(
"ADDITIONAL_PLUGINS", join(
",", $this->plugins));
292 include_once
"./Services/Utilities/classes/class.ilUtil.php";
302 $tpl->parseCurrentBlock();
303 $this->tpl->setVariable(
"CONTENT_BLOCK",
$tpl->get());
311 $validtags =
array(
"strong",
"em",
"p",
"br",
"div",
"span");
312 $buttontags =
array(
"strong",
"em");
313 include_once
"./Services/UICore/classes/class.ilTemplate.php";
314 $template =
new ilTemplate(
"tpl.usereditor.html",
true,
true,
"Services/RTE");
316 $template->setCurrentBlock(
"tinymce");
317 $template->setVariable(
"JAVASCRIPT_LOCATION",
"./Services/RTE/tiny_mce".$this->
vd.
"/tiny_mce.js");
318 include_once
"./Services/Object/classes/class.ilObject.php";
319 $template->setVariable(
"SELECTOR", $editor_selector);
320 $template->setVariable(
"BLOCKFORMATS",
"");
324 $template->setVariable(
"STYLE_SELECT",
",styleselect");
327 include_once
"./Services/Utilities/classes/class.ilUtil.php";
331 $template->parseCurrentBlock();
332 $this->tpl->setCurrentBlock(
"HeadContent");
333 $this->tpl->setVariable(
"CONTENT_BLOCK", $template->get());
334 $this->tpl->parseCurrentBlock();
345 $btns = explode(
',', $btns);
350 return implode(
',', $btns);
360 $this->styleselect = $a_styleselect;
379 $blockformats =
array();
381 if (in_array(
"p", $a_html_tags))
383 array_push($blockformats,
"p");
385 if (in_array(
"div", $a_html_tags))
387 array_push($blockformats,
"div");
389 if (in_array(
"pre", $a_html_tags))
391 array_push($blockformats,
"pre");
393 if (in_array(
"code", $a_html_tags))
395 array_push($blockformats,
"code");
397 if (in_array(
"h1", $a_html_tags))
399 array_push($blockformats,
"h1");
401 if (in_array(
"h2", $a_html_tags))
403 array_push($blockformats,
"h2");
405 if (in_array(
"h3", $a_html_tags))
407 array_push($blockformats,
"h3");
409 if (in_array(
"h4", $a_html_tags))
411 array_push($blockformats,
"h4");
413 if (in_array(
"h5", $a_html_tags))
415 array_push($blockformats,
"h5");
417 if (in_array(
"h6", $a_html_tags))
419 array_push($blockformats,
"h6");
421 if (count($blockformats))
423 return join(
",", $blockformats);
438 $theme_advanced_buttons =
array();
440 if($a_buttons_section == 1)
442 if (in_array(
"strong", $a_html_tags))
444 array_push($theme_advanced_buttons,
"bold");
446 if (in_array(
"em", $a_html_tags))
448 array_push($theme_advanced_buttons,
"italic");
450 if (in_array(
"u", $a_html_tags))
452 array_push($theme_advanced_buttons,
"underline");
454 if (in_array(
"strike", $a_html_tags))
456 array_push($theme_advanced_buttons,
"strikethrough");
458 if (count($theme_advanced_buttons))
460 array_push($theme_advanced_buttons,
"separator");
462 if (in_array(
"p", $a_html_tags))
464 array_push($theme_advanced_buttons,
"justifyleft");
465 array_push($theme_advanced_buttons,
"justifycenter");
466 array_push($theme_advanced_buttons,
"justifyright");
467 array_push($theme_advanced_buttons,
"justifyfull");
468 array_push($theme_advanced_buttons,
"separator");
472 array_push($theme_advanced_buttons,
"formatselect");
474 if (in_array(
"hr", $a_html_tags))
476 array_push($theme_advanced_buttons,
"hr");
478 array_push($theme_advanced_buttons,
"removeformat");
479 array_push($theme_advanced_buttons,
"separator");
480 if (in_array(
"sub", $a_html_tags))
482 array_push($theme_advanced_buttons,
"sub");
484 if (in_array(
"sup", $a_html_tags))
486 array_push($theme_advanced_buttons,
"sup");
488 if (in_array(
"font", $a_html_tags))
490 array_push($theme_advanced_buttons,
"fontselect");
491 array_push($theme_advanced_buttons,
"fontsizeselect");
493 array_push($theme_advanced_buttons,
"charmap");
494 if ((in_array(
"ol", $a_html_tags)) && (in_array(
"li", $a_html_tags)))
496 array_push($theme_advanced_buttons,
"bullist");
498 if ((in_array(
"ul", $a_html_tags)) && (in_array(
"li", $a_html_tags)))
500 array_push($theme_advanced_buttons,
"numlist");
502 array_push($theme_advanced_buttons,
"separator");
503 if (in_array(
"cite", $a_html_tags))
505 array_push($theme_advanced_buttons,
"cite");
507 if (in_array(
"abbr", $a_html_tags))
509 array_push($theme_advanced_buttons,
"abbr");
511 if (in_array(
"acronym", $a_html_tags))
513 array_push($theme_advanced_buttons,
"acronym");
515 if (in_array(
"del", $a_html_tags))
517 array_push($theme_advanced_buttons,
"del");
519 if (in_array(
"ins", $a_html_tags))
521 array_push($theme_advanced_buttons,
"ins");
523 if (in_array(
"blockquote", $a_html_tags))
525 array_push($theme_advanced_buttons,
"indent");
526 array_push($theme_advanced_buttons,
"outdent");
528 if (in_array(
"img", $a_html_tags))
531 array_push($theme_advanced_buttons,
"image");
532 array_push($theme_advanced_buttons,
"ibrowser");
533 array_push($theme_advanced_buttons,
"ilimgupload");
535 if (in_array(
"a", $a_html_tags))
537 array_push($theme_advanced_buttons,
"link");
538 array_push($theme_advanced_buttons,
"unlink");
539 array_push($theme_advanced_buttons,
"anchor");
541 array_push($theme_advanced_buttons,
"separator");
542 array_push($theme_advanced_buttons,
"undo");
543 array_push($theme_advanced_buttons,
"redo");
545 if(is_array($this->buttons) && count($this->buttons))
547 array_push($theme_advanced_buttons,
"separator");
548 foreach($this->buttons as $button)
550 array_push($theme_advanced_buttons, $button);
554 array_push($theme_advanced_buttons,
"code");
555 array_push($theme_advanced_buttons,
"fullscreen");
558 array_push($theme_advanced_buttons,
"pasteword");
560 else if($a_buttons_section == 2)
562 array_push($theme_advanced_buttons,
"cut");
563 array_push($theme_advanced_buttons,
"copy");
564 array_push($theme_advanced_buttons,
"paste");
565 array_push($theme_advanced_buttons,
"pastetext");
569 else if($a_buttons_section == 3)
574 if (is_array($remove_buttons))
576 foreach ($remove_buttons as $buttontext)
578 if ((
$res = array_search($buttontext, $theme_advanced_buttons)) !== FALSE)
580 unset($theme_advanced_buttons[
$res]);
585 return join(
",", $theme_advanced_buttons);
594 $theme_advanced_buttons =
array();
595 if (in_array(
"strong", $a_html_tags))
597 array_push($theme_advanced_buttons,
"bold");
599 if (in_array(
"em", $a_html_tags))
601 array_push($theme_advanced_buttons,
"italic");
603 if (in_array(
"u", $a_html_tags))
605 array_push($theme_advanced_buttons,
"underline");
607 if (in_array(
"strike", $a_html_tags))
609 array_push($theme_advanced_buttons,
"strikethrough");
611 if (in_array(
"p", $a_html_tags))
613 array_push($theme_advanced_buttons,
"justifyleft");
614 array_push($theme_advanced_buttons,
"justifycenter");
615 array_push($theme_advanced_buttons,
"justifyright");
616 array_push($theme_advanced_buttons,
"justifyfull");
620 array_push($theme_advanced_buttons,
"formatselect");
622 if (in_array(
"hr", $a_html_tags))
624 array_push($theme_advanced_buttons,
"hr");
626 if (in_array(
"sub", $a_html_tags))
628 array_push($theme_advanced_buttons,
"sub");
630 if (in_array(
"sup", $a_html_tags))
632 array_push($theme_advanced_buttons,
"sup");
634 if (in_array(
"font", $a_html_tags))
636 array_push($theme_advanced_buttons,
"fontselect");
637 array_push($theme_advanced_buttons,
"fontsizeselect");
639 if ((in_array(
"ol", $a_html_tags)) && (in_array(
"li", $a_html_tags)))
641 array_push($theme_advanced_buttons,
"bullist");
643 if ((in_array(
"ul", $a_html_tags)) && (in_array(
"li", $a_html_tags)))
645 array_push($theme_advanced_buttons,
"numlist");
647 if (in_array(
"cite", $a_html_tags))
649 array_push($theme_advanced_buttons,
"cite");
651 if (in_array(
"abbr", $a_html_tags))
653 array_push($theme_advanced_buttons,
"abbr");
655 if (in_array(
"acronym", $a_html_tags))
657 array_push($theme_advanced_buttons,
"acronym");
659 if (in_array(
"del", $a_html_tags))
661 array_push($theme_advanced_buttons,
"del");
663 if (in_array(
"ins", $a_html_tags))
665 array_push($theme_advanced_buttons,
"ins");
667 if (in_array(
"blockquote", $a_html_tags))
669 array_push($theme_advanced_buttons,
"indent");
670 array_push($theme_advanced_buttons,
"outdent");
672 if (in_array(
"img", $a_html_tags))
675 array_push($theme_advanced_buttons,
"image");
676 array_push($theme_advanced_buttons,
"ibrowser");
677 array_push($theme_advanced_buttons,
"ilimgupload");
679 if (in_array(
"a", $a_html_tags))
681 array_push($theme_advanced_buttons,
"link");
682 array_push($theme_advanced_buttons,
"unlink");
683 array_push($theme_advanced_buttons,
"anchor");
687 if (is_array($remove_buttons))
689 foreach ($remove_buttons as $buttontext)
691 if ((
$res = array_search($buttontext, $theme_advanced_buttons)) !== FALSE)
693 unset($theme_advanced_buttons[
$res]);
698 return join(
",", $theme_advanced_buttons);
707 $theme_advanced_buttons =
array();
708 if (in_array(
"table", $a_html_tags) && in_array(
"tr", $a_html_tags) && in_array(
"td", $a_html_tags))
710 array_push($theme_advanced_buttons,
"tablecontrols");
714 if (is_array($remove_buttons))
716 foreach ($remove_buttons as $buttontext)
718 if ((
$res = array_search($buttontext, $theme_advanced_buttons)) !== FALSE)
720 unset($theme_advanced_buttons[
$res]);
725 return join(
",", $theme_advanced_buttons);
731 if(file_exists(
"./Services/RTE/tiny_mce" . $this->
vd .
"/langs/$lang.js"))
747 $valid_elements =
array();
748 foreach($a_html_tags as $tag)
753 array_push($valid_elements,
"a[accesskey|charset|class|coords|dir<ltr?rtl|href|hreflang|id|lang|name" 754 .
"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup" 755 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|rel|rev" 756 .
"|shape<circle?default?poly?rect|style|tabindex|title|target|type]");
759 array_push($valid_elements,
"abbr[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 760 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 764 array_push($valid_elements,
"acronym[class|dir<ltr?rtl|id|id|lang|onclick|ondblclick|onkeydown|onkeypress" 765 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 769 array_push($valid_elements,
"address[class|align|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown" 770 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover" 771 .
"|onmouseup|style|title]");
774 array_push($valid_elements,
"applet[align<bottom?left?middle?right?top|alt|archive|class|code|codebase" 775 .
"|height|hspace|id|name|object|style|title|vspace|width]");
778 array_push($valid_elements,
"area[accesskey|alt|class|coords|dir<ltr?rtl|href|id|lang|nohref<nohref" 779 .
"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup" 780 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup" 781 .
"|shape<circle?default?poly?rect|style|tabindex|title|target]");
784 array_push($valid_elements,
"base[href|target]");
787 array_push($valid_elements,
"basefont[color|face|id|size]");
790 array_push($valid_elements,
"bdo[class|dir<ltr?rtl|id|lang|style|title]");
793 array_push($valid_elements,
"big[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 794 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 798 array_push($valid_elements,
"blockquote[dir|style|cite|class|dir<ltr?rtl|id|lang|onclick|ondblclick" 799 .
"|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout" 800 .
"|onmouseover|onmouseup|style|title]");
803 array_push($valid_elements,
"body[alink|background|bgcolor|class|dir<ltr?rtl|id|lang|link|onclick" 804 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onload|onmousedown|onmousemove" 805 .
"|onmouseout|onmouseover|onmouseup|onunload|style|title|text|vlink]");
808 array_push($valid_elements,
"br[class|clear<all?left?none?right|id|style|title]");
811 array_push($valid_elements,
"button[accesskey|class|dir<ltr?rtl|disabled<disabled|id|lang|name|onblur" 812 .
"|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onmousedown" 813 .
"|onmousemove|onmouseout|onmouseover|onmouseup|style|tabindex|title|type" 817 array_push($valid_elements,
"caption[align<bottom?left?right?top|class|dir<ltr?rtl|id|lang|onclick" 818 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove" 819 .
"|onmouseout|onmouseover|onmouseup|style|title]");
822 array_push($valid_elements,
"center[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 823 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 827 array_push($valid_elements,
"cite[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 828 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 832 array_push($valid_elements,
"code[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 833 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 837 array_push($valid_elements,
"col[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id" 838 .
"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown" 839 .
"|onmousemove|onmouseout|onmouseover|onmouseup|span|style|title" 840 .
"|valign<baseline?bottom?middle?top|width]");
843 array_push($valid_elements,
"colgroup[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl" 844 .
"|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown" 845 .
"|onmousemove|onmouseout|onmouseover|onmouseup|span|style|title" 846 .
"|valign<baseline?bottom?middle?top|width]");
849 array_push($valid_elements,
"dd[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup" 850 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
853 array_push($valid_elements,
"del[cite|class|datetime|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown" 854 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover" 855 .
"|onmouseup|style|title]");
858 array_push($valid_elements,
"dfn[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 859 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 863 array_push($valid_elements,
"dir[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown" 864 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover" 865 .
"|onmouseup|style|title]");
868 array_push($valid_elements,
"div[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick" 869 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove" 870 .
"|onmouseout|onmouseover|onmouseup|style|title]");
873 array_push($valid_elements,
"dl[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown" 874 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover" 875 .
"|onmouseup|style|title]");
878 array_push($valid_elements,
"dt[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup" 879 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
882 array_push($valid_elements,
"em/i[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 883 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 887 array_push($valid_elements,
"fieldset[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 888 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 892 array_push($valid_elements,
"font[class|color|dir<ltr?rtl|face|id|lang|size|style|title]");
895 array_push($valid_elements,
"form[accept|accept-charset|action|class|dir<ltr?rtl|enctype|id|lang" 896 .
"|method<get?post|name|onclick|ondblclick|onkeydown|onkeypress|onkeyup" 897 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onreset|onsubmit" 898 .
"|style|title|target]");
901 array_push($valid_elements,
"frame[class|frameborder|id|longdesc|marginheight|marginwidth|name" 902 .
"|noresize<noresize|scrolling<auto?no?yes|src|style|title]");
905 array_push($valid_elements,
"frameset[class|cols|id|onload|onunload|rows|style|title]");
908 array_push($valid_elements,
"h1[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick" 909 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove" 910 .
"|onmouseout|onmouseover|onmouseup|style|title]");
913 array_push($valid_elements,
"h2[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick" 914 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove" 915 .
"|onmouseout|onmouseover|onmouseup|style|title]");
918 array_push($valid_elements,
"h3[align<center?justify?left?right|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,
"h4[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick" 924 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove" 925 .
"|onmouseout|onmouseover|onmouseup|style|title]");
928 array_push($valid_elements,
"h5[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick" 929 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove" 930 .
"|onmouseout|onmouseover|onmouseup|style|title]");
933 array_push($valid_elements,
"h6[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick" 934 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove" 935 .
"|onmouseout|onmouseover|onmouseup|style|title]");
938 array_push($valid_elements,
"head[dir<ltr?rtl|lang|profile]");
941 array_push($valid_elements,
"hr[align<center?left?right|class|dir<ltr?rtl|id|lang|noshade<noshade|onclick" 942 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove" 943 .
"|onmouseout|onmouseover|onmouseup|size|style|title|width]");
946 array_push($valid_elements,
"html[dir<ltr?rtl|lang|version]");
949 array_push($valid_elements,
"iframe[align<bottom?left?middle?right?top|class|frameborder|height|id" 950 .
"|longdesc|marginheight|marginwidth|name|scrolling<auto?no?yes|src|style" 954 array_push($valid_elements,
"img[align<bottom?left?middle?right?top|alt|border|class|dir<ltr?rtl|height" 955 .
"|hspace|id|ismap<ismap|lang|longdesc|name|onclick|ondblclick|onkeydown" 956 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover" 957 .
"|onmouseup|src|style|title|usemap|vspace|width]");
960 array_push($valid_elements,
"input[accept|accesskey|align<bottom?left?middle?right?top|alt" 961 .
"|checked<checked|class|dir<ltr?rtl|disabled<disabled|id|ismap<ismap|lang" 962 .
"|maxlength|name|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress" 963 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onselect" 964 .
"|readonly<readonly|size|src|style|tabindex|title" 965 .
"|type<button?checkbox?file?hidden?image?password?radio?reset?submit?text" 969 array_push($valid_elements,
"ins[cite|class|datetime|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown" 970 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover" 971 .
"|onmouseup|style|title]");
974 array_push($valid_elements,
"isindex[class|dir<ltr?rtl|id|lang|prompt|style|title]");
977 array_push($valid_elements,
"kbd[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 978 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 982 array_push($valid_elements,
"label[accesskey|class|dir<ltr?rtl|for|id|lang|onblur|onclick|ondblclick" 983 .
"|onfocus|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout" 984 .
"|onmouseover|onmouseup|style|title]");
987 array_push($valid_elements,
"legend[align<bottom?left?right?top|accesskey|class|dir<ltr?rtl|id|lang" 988 .
"|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove" 989 .
"|onmouseout|onmouseover|onmouseup|style|title]");
992 array_push($valid_elements,
"li[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup" 993 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title|type" 997 array_push($valid_elements,
"link[charset|class|dir<ltr?rtl|href|hreflang|id|lang|media|onclick" 998 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove" 999 .
"|onmouseout|onmouseover|onmouseup|rel|rev|style|title|target|type]");
1002 array_push($valid_elements,
"map[class|dir<ltr?rtl|id|lang|name|onclick|ondblclick|onkeydown|onkeypress" 1003 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 1007 array_push($valid_elements,
"menu[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown" 1008 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover" 1009 .
"|onmouseup|style|title]");
1012 array_push($valid_elements,
"meta[content|dir<ltr?rtl|http-equiv|lang|name|scheme]");
1015 array_push($valid_elements,
"noframes[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 1016 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 1020 array_push($valid_elements,
"noscript[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 1021 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 1025 array_push($valid_elements,
"object[align<bottom?left?middle?right?top|archive|border|class|classid" 1026 .
"|codebase|codetype|data|declare|dir<ltr?rtl|height|hspace|id|lang|name" 1027 .
"|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove" 1028 .
"|onmouseout|onmouseover|onmouseup|standby|style|tabindex|title|type|usemap" 1032 array_push($valid_elements,
"ol[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown" 1033 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover" 1034 .
"|onmouseup|start|style|title|type]");
1037 array_push($valid_elements,
"optgroup[class|dir<ltr?rtl|disabled<disabled|id|label|lang|onclick" 1038 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove" 1039 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1042 array_push($valid_elements,
"option[class|dir<ltr?rtl|disabled<disabled|id|label|lang|onclick|ondblclick" 1043 .
"|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout" 1044 .
"|onmouseover|onmouseup|selected<selected|style|title|value]");
1047 array_push($valid_elements,
"p[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick" 1048 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove" 1049 .
"|onmouseout|onmouseover|onmouseup|style|title]");
1052 array_push($valid_elements,
"param[id|name|type|value|valuetype<DATA?OBJECT?REF]");
1058 array_push($valid_elements,
"pre/listing/plaintext/xmp[align|class|dir<ltr?rtl|id|lang|onclick|ondblclick" 1059 .
"|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout" 1060 .
"|onmouseover|onmouseup|style|title|width]");
1063 array_push($valid_elements,
"q[cite|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 1064 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 1068 array_push($valid_elements,
"s[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup" 1069 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
1072 array_push($valid_elements,
"samp[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 1073 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 1077 array_push($valid_elements,
"script[charset|defer|language|src|type]");
1080 array_push($valid_elements,
"select[class|dir<ltr?rtl|disabled<disabled|id|lang|multiple<multiple|name" 1081 .
"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup" 1082 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|size|style" 1083 .
"|tabindex|title]");
1086 array_push($valid_elements,
"small[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 1087 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 1091 array_push($valid_elements,
"span[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown" 1092 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover" 1093 .
"|onmouseup|style|title]");
1096 array_push($valid_elements,
"strike[class|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown" 1097 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover" 1098 .
"|onmouseup|style|title]");
1101 array_push($valid_elements,
"strong/b[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 1102 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 1106 array_push($valid_elements,
"style[dir<ltr?rtl|lang|media|title|type]");
1109 array_push($valid_elements,
"sub[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 1110 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 1114 array_push($valid_elements,
"sup[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 1115 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 1119 array_push($valid_elements,
"table[align<center?left?right|bgcolor|border|cellpadding|cellspacing|class" 1120 .
"|dir<ltr?rtl|frame|height|id|lang|onclick|ondblclick|onkeydown|onkeypress" 1121 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|rules" 1122 .
"|style|summary|title|width]");
1125 array_push($valid_elements,
"tbody[align<center?char?justify?left?right|char|class|charoff|dir<ltr?rtl|id" 1126 .
"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown" 1127 .
"|onmousemove|onmouseout|onmouseover|onmouseup|style|title" 1128 .
"|valign<baseline?bottom?middle?top]");
1131 array_push($valid_elements,
"td[abbr|align<center?char?justify?left?right|axis|bgcolor|char|charoff|class" 1132 .
"|colspan|dir<ltr?rtl|headers|height|id|lang|nowrap<nowrap|onclick" 1133 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove" 1134 .
"|onmouseout|onmouseover|onmouseup|rowspan|scope<col?colgroup?row?rowgroup" 1135 .
"|style|title|valign<baseline?bottom?middle?top|width]");
1138 array_push($valid_elements,
"textarea[accesskey|class|cols|dir<ltr?rtl|disabled<disabled|id|lang|name" 1139 .
"|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup" 1140 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onselect" 1141 .
"|readonly<readonly|rows|style|tabindex|title]");
1144 array_push($valid_elements,
"tfoot[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id" 1145 .
"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown" 1146 .
"|onmousemove|onmouseout|onmouseover|onmouseup|style|title" 1147 .
"|valign<baseline?bottom?middle?top]");
1150 array_push($valid_elements,
"th[abbr|align<center?char?justify?left?right|axis|bgcolor|char|charoff|class" 1151 .
"|colspan|dir<ltr?rtl|headers|height|id|lang|nowrap<nowrap|onclick" 1152 .
"|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove" 1153 .
"|onmouseout|onmouseover|onmouseup|rowspan|scope<col?colgroup?row?rowgroup" 1154 .
"|style|title|valign<baseline?bottom?middle?top|width]");
1157 array_push($valid_elements,
"thead[align<center?char?justify?left?right|char|charoff|class|dir<ltr?rtl|id" 1158 .
"|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown" 1159 .
"|onmousemove|onmouseout|onmouseover|onmouseup|style|title" 1160 .
"|valign<baseline?bottom?middle?top]");
1163 array_push($valid_elements,
"title[dir<ltr?rtl|lang]");
1166 array_push($valid_elements,
"tr[abbr|align<center?char?justify?left?right|bgcolor|char|charoff|class" 1167 .
"|rowspan|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 1168 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 1169 .
"|title|valign<baseline?bottom?middle?top]");
1172 array_push($valid_elements,
"tt[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup" 1173 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
1176 array_push($valid_elements,
"u[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress|onkeyup" 1177 .
"|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style|title]");
1181 array_push($valid_elements,
"span[align<center?justify?left?right|class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown" 1182 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover" 1183 .
"|onmouseup|style|title]");
1186 array_push($valid_elements,
"ul[class|compact<compact|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown" 1187 .
"|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover" 1188 .
"|onmouseup|style|title|type]");
1191 array_push($valid_elements,
"var[class|dir<ltr?rtl|id|lang|onclick|ondblclick|onkeydown|onkeypress" 1192 .
"|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|style" 1197 return join(
",", $valid_elements);
1207 while(strpos($a_string,
'separator,separator') !==
false)
1209 $a_string = str_replace(
'separator,separator',
'separator', $a_string);
1212 while(strpos($a_string,
',,') !==
false)
1214 $a_string = str_replace(
',,',
',', $a_string);
1217 if($a_string{0} ==
',')
1219 $a_string = (
string)substr($a_string, 1);
1222 if(strlen($a_string) && $a_string{strlen($a_string) - 1} ==
',')
1224 $a_string = substr($a_string, 0, strlen($a_string) - 1);
addUserTextEditor($editor_selector)
{}
vd()
shortcut for var_dump with enhanced debug information
_buildAdvancedButtonsFromHTMLTags($a_buttons_section, array $a_html_tags)
handleImagePluginsBeforeRendering(array $tags)
setStyleSelect($a_styleselect)
Set Enable Style Selecttion.
getStyleSelect()
Get Enable Style Selecttion.
static _getRichTextEditor()
Returns the identifier for the Rich Text Editor.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
disableButtons($a_button)
Sets buttons which should be disabled in the RTE.
static _getUsedHTMLTags($a_module="")
Returns an array of all allowed HTML tags for text editing.
static getNewContentStyleSheetLocation($mode="output")
get full style sheet file name (path inclusive) of current user
addCustomRTESupport($obj_id, $obj_type, array $tags)
{}
removePlugin($a_plugin_name)
{}
Add rich text string
The name of the decorator.
_buildButtonsFromHTMLTags(array $a_html_tags)
static _setRichTextEditorUserState($a_state)
Sets the state of the rich text editor visibility for the current user.
static removeRedundantSeparators($a_string)
Removes redundant seperators and removes ,, and , at the first or last position of the string...
__construct($a_version='')
{}
handleIliasImageManagerAdded()
Rich Text Editor base class This class provides access methods to a Rich Text Editor (RTE) integrated...
addRTESupport($obj_id, $obj_type, $a_module="", $allowFormElements=FALSE, $cfg_template=null, $hide_switch=false)
{}
touchBlock($block)
overwrites ITX::touchBlock.
_buildAdvancedTableButtonsFromHTMLTags(array $a_html_tags)
special template class to simplify handling of ITX/PEAR
addPlugin($a_plugin_name)
{}
Create styles array
The data for the language used.
blockExists($a_blockname)
check if block exists in actual template private
addInternalTinyMCEImageManager()
getRTERootBlockElement()
Getter for the RTE root block element.
static _getRichTextEditorUserState()
Gets the state of the rich text editor visibility for the current user.
getButtonsForUserTextEditor(array $buttontags)
handleImgContextMenuItem(ilTemplate $tpl)
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
getDisabledButtons($as_array=true)
Returns the disabled RTE buttons.
getRemoveImgContextMenuItem()
handleIliasImageManagerRemoved()
_buildAdvancedBlockformatsFromHTMLTags(array $a_html_tags)
_getValidElementsFromHTMLTags(array $a_html_tags)
$remove_img_context_menu_item
setRemoveImgContextMenuItem($remove_img_context_menu_item)