24 include_once(
"./Services/Form/classes/class.ilSubEnabledFormPropertyGUI.php");
25 include_once
"./Services/RTE/classes/class.ilRTE.php";
87 "standard" => array (
"strong",
"em",
"u",
"ol",
"li",
"ul",
"p",
"div",
88 "i",
"b",
"code",
"sup",
"sub",
"pre",
"strike",
"gap"),
90 "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
91 "h4",
"h5",
"h6",
"hr",
"li",
"ol",
"p",
92 "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"u",
"ul",
94 "extended_img" => array (
95 "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
96 "h4",
"h5",
"h6",
"hr",
"img",
"li",
"ol",
"p",
97 "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"u",
"ul",
99 "extended_table" => array (
100 "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
101 "h4",
"h5",
"h6",
"hr",
"li",
"ol",
"p",
102 "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"table",
"td",
103 "tr",
"u",
"ul",
"i",
"b",
"gap"),
104 "extended_table_img" => array (
105 "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
106 "h4",
"h5",
"h6",
"hr",
"img",
"li",
"ol",
"p",
107 "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"table",
"td",
108 "tr",
"u",
"ul",
"i",
"b",
"gap"),
110 "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
111 "h4",
"h5",
"h6",
"hr",
"img",
"li",
"ol",
"p",
112 "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"table",
"td",
113 "tr",
"u",
"ul",
"ruby",
"rbc",
"rtc",
"rb",
"rt",
"rp",
"i",
"b",
"gap"));
127 $this->plugins = array();
128 $this->removeplugins = array();
129 $this->buttons = array();
130 $this->rteSupport = array();
140 $this->value = $a_value;
160 $this->cols = $a_cols;
180 $this->rows = $a_rows;
201 $this->usert = $a_usert;
205 $this->rteSupport[
'version'] = $version;
226 $this->plugins[$a_plugin] = $a_plugin;
236 $this->removeplugins[$a_plugin] = $a_plugin;
246 $this->buttons[$a_button] = $a_button;
256 unset($this->buttons[$a_button]);
266 function setRTESupport($obj_id, $obj_type, $module, $cfg_template = null, $hide_switch =
false, $version = null)
268 $this->rteSupport = array(
"obj_id" => $obj_id,
"obj_type" => $obj_type,
"module" => $module,
'cfg_template' => $cfg_template,
'hide_switch' => $hide_switch,
'version' => $version);
276 $this->rteSupport = array();
286 $this->rtetags = $a_rtetags;
307 $this->
setRteTags($this->rte_tag_set[$a_set_name]);
318 return $this->rte_tag_set[$a_set_name];
342 $this->use_tags_for_rte_only = $a_val;
366 $item->setValueByArray($a_values);
378 include_once(
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php");
388 if ($this->plugins[
"latex"] ==
"latex" && !is_int(strpos($allowed,
"<span>")))
399 $this->
setAlert($lng->txt(
"msg_input_is_required"));
413 $ttpl =
new ilTemplate(
"tpl.prop_textarea.html",
true,
true,
"Services/Form");
418 $ttpl->setCurrentBlock(
"disabled_rte");
419 $ttpl->setVariable(
"DR_VAL", $this->
getValue());
420 $ttpl->parseCurrentBlock();
427 include_once
"./Services/RTE/classes/class.$rtestring.php";
428 $rte =
new $rtestring($this->rteSupport[
'version']);
431 $rte->addPlugin(
"emotions");
432 foreach ($this->plugins as $plugin)
436 $rte->addPlugin($plugin);
439 foreach ($this->removeplugins as $plugin)
443 $rte->removePlugin($plugin);
447 foreach ($this->buttons as $button)
451 $rte->addButton($button);
462 if (count($this->rteSupport) >= 3)
464 $rte->addRTESupport($this->rteSupport[
"obj_id"], $this->rteSupport[
"obj_type"], $this->rteSupport[
"module"],
false, $this->rteSupport[
'cfg_template'], $this->rteSupport[
'hide_switch']);
468 $rte->addCustomRTESupport(0,
"", $this->
getRteTags());
471 $ttpl->touchBlock(
"prop_ta_w");
472 $ttpl->setCurrentBlock(
"prop_textarea");
473 $ttpl->setVariable(
"ROWS", $this->
getRows());
477 $ttpl->touchBlock(
"no_rteditor");
481 $ttpl->setCurrentBlock(
"prop_ta_c");
482 $ttpl->setVariable(
"COLS", $this->
getCols());
483 $ttpl->parseCurrentBlock();
487 $ttpl->touchBlock(
"prop_ta_w");
490 $ttpl->setCurrentBlock(
"prop_textarea");
491 $ttpl->setVariable(
"ROWS", $this->
getRows());
495 $ttpl->setVariable(
"POST_VAR",
498 $ttpl->setVariable(
"ID", $this->
getFieldId());
501 $ttpl->setVariable(
'DISABLED',
'disabled="disabled" ');
504 $ttpl->parseCurrentBlock();
509 $ttpl->setVariable(
"HIDDEN_INPUT",
514 $a_tpl->setCurrentBlock(
"prop_generic");
515 $a_tpl->setVariable(
"PROP_GENERIC", $ttpl->get());
516 $a_tpl->parseCurrentBlock();
571 $this->root_block_element = $a_root_block_element;
596 if(is_array($a_button))
598 $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, $a_button));
602 $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, array($a_button)));
620 return implode(
',', $this->disabled_buttons);