24 include_once(
"./Services/Form/classes/class.ilSubEnabledFormPropertyGUI.php");
85 "standard" => array (
"strong",
"em",
"u",
"ol",
"li",
"ul",
"p",
"div",
86 "i",
"b",
"code",
"sup",
"sub",
"pre",
"strike",
"gap"),
88 "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
89 "h4",
"h5",
"h6",
"hr",
"li",
"ol",
"p",
90 "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"u",
"ul",
92 "extended_img" => array (
93 "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
94 "h4",
"h5",
"h6",
"hr",
"img",
"li",
"ol",
"p",
95 "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"u",
"ul",
97 "extended_table" => array (
98 "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
99 "h4",
"h5",
"h6",
"hr",
"li",
"ol",
"p",
100 "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"table",
"td",
101 "tr",
"u",
"ul",
"i",
"b",
"gap"),
102 "extended_table_img" => array (
103 "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
104 "h4",
"h5",
"h6",
"hr",
"img",
"li",
"ol",
"p",
105 "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"table",
"td",
106 "tr",
"u",
"ul",
"i",
"b",
"gap"),
108 "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
109 "h4",
"h5",
"h6",
"hr",
"img",
"li",
"ol",
"p",
110 "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"table",
"td",
111 "tr",
"u",
"ul",
"ruby",
"rbc",
"rtc",
"rb",
"rt",
"rp",
"i",
"b",
"gap"));
125 $this->plugins = array();
126 $this->removeplugins = array();
127 $this->buttons = array();
128 $this->rteSupport = array();
138 $this->value = $a_value;
158 $this->cols = $a_cols;
178 $this->rows = $a_rows;
198 $this->usert = $a_usert;
218 $this->plugins[$a_plugin] = $a_plugin;
228 $this->removeplugins[$a_plugin] = $a_plugin;
238 $this->buttons[$a_button] = $a_button;
248 unset($this->buttons[$a_button]);
260 $this->rteSupport = array(
"obj_id" => $obj_id,
"obj_type" => $obj_type,
"module" => $module,
'cfg_template' => $cfg_template);
268 $this->rteSupport = array();
278 $this->rtetags = $a_rtetags;
299 $this->
setRteTags($this->rte_tag_set[$a_set_name]);
310 return $this->rte_tag_set[$a_set_name];
345 include_once(
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php");
355 if ($this->plugins[
"latex"] ==
"latex" && !is_int(strpos($allowed,
"<span>")))
366 $this->
setAlert($lng->txt(
"msg_input_is_required"));
380 $ttpl =
new ilTemplate(
"tpl.prop_textarea.html",
true,
true,
"Services/Form");
385 $ttpl->setCurrentBlock(
"disabled_rte");
386 $ttpl->setVariable(
"DR_VAL", $this->
getValue());
387 $ttpl->parseCurrentBlock();
393 include_once
"./Services/RTE/classes/class.ilRTE.php";
395 include_once
"./Services/RTE/classes/class.$rtestring.php";
396 $rte =
new $rtestring();
399 $rte->addPlugin(
"emotions");
400 foreach ($this->plugins as $plugin)
404 $rte->addPlugin($plugin);
407 foreach ($this->removeplugins as $plugin)
411 $rte->removePlugin($plugin);
415 foreach ($this->buttons as $button)
419 $rte->addButton($button);
430 if (count($this->rteSupport) >= 3)
432 $rte->addRTESupport($this->rteSupport[
"obj_id"], $this->rteSupport[
"obj_type"], $this->rteSupport[
"module"],
false, $this->rteSupport[
'cfg_template']);
436 $rte->addCustomRTESupport(0,
"", $this->
getRteTags());
439 $ttpl->touchBlock(
"prop_ta_w");
440 $ttpl->setCurrentBlock(
"prop_textarea");
441 $ttpl->setVariable(
"ROWS", $this->
getRows());
445 $ttpl->touchBlock(
"no_rteditor");
449 $ttpl->setCurrentBlock(
"prop_ta_c");
450 $ttpl->setVariable(
"COLS", $this->
getCols());
451 $ttpl->parseCurrentBlock();
455 $ttpl->touchBlock(
"prop_ta_w");
458 $ttpl->setCurrentBlock(
"prop_textarea");
459 $ttpl->setVariable(
"ROWS", $this->
getRows());
463 $ttpl->setVariable(
"POST_VAR",
466 $ttpl->setVariable(
"ID", $this->
getFieldId());
469 $ttpl->setVariable(
'DISABLED',
'disabled="disabled" ');
472 $ttpl->parseCurrentBlock();
477 $ttpl->setVariable(
"HIDDEN_INPUT",
482 $a_tpl->setCurrentBlock(
"prop_generic");
483 $a_tpl->setVariable(
"PROP_GENERIC", $ttpl->get());
484 $a_tpl->parseCurrentBlock();
539 $this->root_block_element = $a_root_block_element;
564 if(is_array($a_button))
566 $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, $a_button));
570 $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, array($a_button)));
588 return implode(
',', $this->disabled_buttons);