24 include_once(
"./Services/Form/classes/class.ilSubEnabledFormPropertyGUI.php");
86 "standard" => array (
"strong",
"em",
"u",
"ol",
"li",
"ul",
"p",
"div",
87 "i",
"b",
"code",
"sup",
"sub",
"pre",
"strike",
"gap"),
89 "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
90 "h4",
"h5",
"h6",
"hr",
"li",
"ol",
"p",
91 "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"u",
"ul",
93 "extended_img" => array (
94 "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
95 "h4",
"h5",
"h6",
"hr",
"img",
"li",
"ol",
"p",
96 "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"u",
"ul",
98 "extended_table" => array (
99 "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
100 "h4",
"h5",
"h6",
"hr",
"li",
"ol",
"p",
101 "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"table",
"td",
102 "tr",
"u",
"ul",
"i",
"b",
"gap"),
103 "extended_table_img" => array (
104 "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
105 "h4",
"h5",
"h6",
"hr",
"img",
"li",
"ol",
"p",
106 "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"table",
"td",
107 "tr",
"u",
"ul",
"i",
"b",
"gap"),
109 "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
110 "h4",
"h5",
"h6",
"hr",
"img",
"li",
"ol",
"p",
111 "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"table",
"td",
112 "tr",
"u",
"ul",
"ruby",
"rbc",
"rtc",
"rb",
"rt",
"rp",
"i",
"b",
"gap"));
126 $this->plugins = array();
127 $this->removeplugins = array();
128 $this->buttons = array();
129 $this->rteSupport = array();
139 $this->value = $a_value;
159 $this->cols = $a_cols;
179 $this->rows = $a_rows;
199 $this->usert = $a_usert;
219 $this->plugins[$a_plugin] = $a_plugin;
229 $this->removeplugins[$a_plugin] = $a_plugin;
239 $this->buttons[$a_button] = $a_button;
249 unset($this->buttons[$a_button]);
259 function setRTESupport($obj_id, $obj_type, $module, $cfg_template = null, $hide_switch =
false, $version = null)
261 $this->rteSupport = array(
"obj_id" => $obj_id,
"obj_type" => $obj_type,
"module" => $module,
'cfg_template' => $cfg_template,
'hide_switch' => $hide_switch,
'version' => $version);
269 $this->rteSupport = array();
279 $this->rtetags = $a_rtetags;
300 $this->
setRteTags($this->rte_tag_set[$a_set_name]);
311 return $this->rte_tag_set[$a_set_name];
335 $this->use_tags_for_rte_only = $a_val;
359 $item->setValueByArray($a_values);
371 include_once(
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php");
381 if ($this->plugins[
"latex"] ==
"latex" && !is_int(strpos($allowed,
"<span>")))
392 $this->
setAlert($lng->txt(
"msg_input_is_required"));
406 $ttpl =
new ilTemplate(
"tpl.prop_textarea.html",
true,
true,
"Services/Form");
411 $ttpl->setCurrentBlock(
"disabled_rte");
412 $ttpl->setVariable(
"DR_VAL", $this->
getValue());
413 $ttpl->parseCurrentBlock();
419 include_once
"./Services/RTE/classes/class.ilRTE.php";
421 include_once
"./Services/RTE/classes/class.$rtestring.php";
422 $rte =
new $rtestring($this->rteSupport[
'version']);
425 $rte->addPlugin(
"emotions");
426 foreach ($this->plugins as $plugin)
430 $rte->addPlugin($plugin);
433 foreach ($this->removeplugins as $plugin)
437 $rte->removePlugin($plugin);
441 foreach ($this->buttons as $button)
445 $rte->addButton($button);
456 if (count($this->rteSupport) >= 3)
458 $rte->addRTESupport($this->rteSupport[
"obj_id"], $this->rteSupport[
"obj_type"], $this->rteSupport[
"module"],
false, $this->rteSupport[
'cfg_template'], $this->rteSupport[
'hide_switch']);
462 $rte->addCustomRTESupport(0,
"", $this->
getRteTags());
465 $ttpl->touchBlock(
"prop_ta_w");
466 $ttpl->setCurrentBlock(
"prop_textarea");
467 $ttpl->setVariable(
"ROWS", $this->
getRows());
471 $ttpl->touchBlock(
"no_rteditor");
475 $ttpl->setCurrentBlock(
"prop_ta_c");
476 $ttpl->setVariable(
"COLS", $this->
getCols());
477 $ttpl->parseCurrentBlock();
481 $ttpl->touchBlock(
"prop_ta_w");
484 $ttpl->setCurrentBlock(
"prop_textarea");
485 $ttpl->setVariable(
"ROWS", $this->
getRows());
489 $ttpl->setVariable(
"POST_VAR",
492 $ttpl->setVariable(
"ID", $this->
getFieldId());
495 $ttpl->setVariable(
'DISABLED',
'disabled="disabled" ');
498 $ttpl->parseCurrentBlock();
503 $ttpl->setVariable(
"HIDDEN_INPUT",
508 $a_tpl->setCurrentBlock(
"prop_generic");
509 $a_tpl->setVariable(
"PROP_GENERIC", $ttpl->get());
510 $a_tpl->parseCurrentBlock();
565 $this->root_block_element = $a_root_block_element;
590 if(is_array($a_button))
592 $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, $a_button));
596 $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, array($a_button)));
614 return implode(
',', $this->disabled_buttons);