24include_once(
"./Services/Form/classes/class.ilSubEnabledFormPropertyGUI.php");
 
   25include_once 
"./Services/RTE/classes/class.ilRTE.php";
 
   92                "mini" => array(
"strong", 
"em", 
"u", 
"ol", 
"li", 
"ul", 
"blockquote", 
"a", 
"p", 
"span", 
"br"), 
 
   93                "standard" => array (
"strong", 
"em", 
"u", 
"ol", 
"li", 
"ul", 
"p", 
"div",
 
   94                        "i", 
"b", 
"code", 
"sup", 
"sub", 
"pre", 
"strike", 
"gap"),
 
   96                        "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
 
   97                        "h4",
"h5",
"h6",
"hr",
"li",
"ol",
"p",
 
   98                        "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"u",
"ul",
 
  100                "extended_img" => array (
 
  101                        "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
 
  102                        "h4",
"h5",
"h6",
"hr",
"img",
"li",
"ol",
"p",
 
  103                        "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"u",
"ul",
 
  105                "extended_table" => array (
 
  106                        "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
 
  107                        "h4",
"h5",
"h6",
"hr",
"li",
"ol",
"p",
 
  108                        "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"table",
"td",
 
  109                        "tr",
"u",
"ul", 
"i", 
"b", 
"gap"),
 
  110                "extended_table_img" => array (
 
  111                        "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
 
  112                        "h4",
"h5",
"h6",
"hr",
"img",
"li",
"ol",
"p",
 
  113                        "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"table",
"td",
 
  114                        "tr",
"u",
"ul", 
"i", 
"b", 
"gap"),
 
  116                        "a",
"blockquote",
"br",
"cite",
"code",
"div",
"em",
"h1",
"h2",
"h3",
 
  117                        "h4",
"h5",
"h6",
"hr",
"img",
"li",
"ol",
"p",
 
  118                        "pre",
"span",
"strike",
"strong",
"sub",
"sup",
"table",
"td",
 
  119                        "tr",
"u",
"ul",
"ruby",
"rbc",
"rtc",
"rb",
"rt",
"rp", 
"i", 
"b", 
"gap"));
 
  130                parent::__construct($a_title, $a_postvar);
 
  133                $this->plugins = array();
 
  134                $this->removeplugins = array();
 
  135                $this->buttons = array();
 
  136                $this->rteSupport = array();
 
  146                $this->value = $a_value;
 
  168                $this->cols = $a_cols;
 
  188                $this->rows = $a_rows;
 
  209                $this->usert = $a_usert;
 
  213                        $this->rteSupport[
'version'] = $version;
 
  234                $this->plugins[$a_plugin] = $a_plugin;
 
  244                $this->removeplugins[$a_plugin] = $a_plugin;
 
  254                $this->buttons[$a_button] = $a_button;
 
  264                unset($this->buttons[$a_button]);
 
  274        function setRTESupport($obj_id, $obj_type, $module, $cfg_template = 
null, $hide_switch = 
false, $version = 
null)
 
  276                $this->rteSupport = array(
"obj_id" => $obj_id, 
"obj_type" => $obj_type, 
"module" => $module, 
'cfg_template' => $cfg_template, 
'hide_switch' => $hide_switch, 
'version' => $version);
 
  284                $this->rteSupport = array();
 
  294                $this->rtetags = $a_rtetags;
 
  315                $this->
setRteTags($this->rte_tag_set[$a_set_name]);
 
  326                return $this->rte_tag_set[$a_set_name];
 
  350                $this->use_tags_for_rte_only = $a_val;
 
  374                        $item->setValueByArray($a_values);
 
  386                include_once(
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php");
 
  396                        if ($this->plugins[
"latex"] == 
"latex" && !is_int(strpos($allowed, 
"<span>")))
 
  409                        $this->
setAlert($lng->txt(
"msg_input_is_required"));
 
  423                $ttpl = 
new ilTemplate(
"tpl.prop_textarea.html", 
true, 
true, 
"Services/Form");
 
  428                        $ttpl->setCurrentBlock(
"disabled_rte");
 
  429                        $ttpl->setVariable(
"DR_VAL", $this->
getValue());
 
  430                        $ttpl->parseCurrentBlock();
 
  437                                include_once 
"./Services/RTE/classes/class.$rtestring.php";
 
  438                                $rte = 
new $rtestring($this->rteSupport[
'version']);
 
  443                                $rte->addPlugin(
"emotions");
 
  444                                foreach ($this->plugins as $plugin)
 
  448                                                $rte->addPlugin($plugin);
 
  451                                foreach ($this->removeplugins as $plugin)
 
  455                                                $rte->removePlugin($plugin);
 
  459                                foreach ($this->buttons as $button)
 
  463                                                $rte->addButton($button);
 
  474                                if (count($this->rteSupport) >= 3)
 
  476                                        $rte->addRTESupport($this->rteSupport[
"obj_id"], $this->rteSupport[
"obj_type"], $this->rteSupport[
"module"], 
false, $this->rteSupport[
'cfg_template'], $this->rteSupport[
'hide_switch']);
 
  483                                                $rte->removeAllPlugins();
 
  486                                                $rte->addPlugin(
"paste"); 
 
  489                                                $rte->disableButtons(array(
"anchor", 
"justifyleft", 
"justifycenter", 
 
  490                                                        "justifyright", 
"justifyfull", 
"formatselect", 
"removeformat",
 
  491                                                        "cut", 
"copy", 
"paste", 
"pastetext")); 
 
  494                                        $rte->addCustomRTESupport(0, 
"", $this->
getRteTags());                                  
 
  497                                $ttpl->touchBlock(
"prop_ta_w");
 
  498                                $ttpl->setCurrentBlock(
"prop_textarea");
 
  499                                $ttpl->setVariable(
"ROWS", $this->
getRows());
 
  503                                $ttpl->touchBlock(
"no_rteditor");
 
  507                                        $ttpl->setCurrentBlock(
"prop_ta_c");
 
  508                                        $ttpl->setVariable(
"COLS", $this->
getCols());
 
  509                                        $ttpl->parseCurrentBlock();
 
  513                                        $ttpl->touchBlock(
"prop_ta_w");
 
  516                                $ttpl->setCurrentBlock(
"prop_textarea");
 
  517                                $ttpl->setVariable(
"ROWS", $this->
getRows());
 
  521                                $ttpl->setVariable(
"POST_VAR",
 
  524                        $ttpl->setVariable(
"ID", $this->
getFieldId());
 
  527                                $ttpl->setVariable(
'DISABLED',
'disabled="disabled" ');
 
  530                        $ttpl->parseCurrentBlock();
 
  535                        $ttpl->setVariable(
"HIDDEN_INPUT",
 
  540                $a_tpl->setCurrentBlock(
"prop_generic");
 
  541                $a_tpl->setVariable(
"PROP_GENERIC", $ttpl->get());
 
  542                $a_tpl->parseCurrentBlock();
 
  597                $this->root_block_element = $a_root_block_element;
 
  622                if(is_array($a_button))
 
  624                        $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, $a_button));
 
  628                        $this->disabled_buttons = array_unique(array_merge($this->disabled_buttons, array($a_button)));
 
  646                        return implode(
',', $this->disabled_buttons);
 
static _getRTEClassname()
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
setInitialRteWidth($initial_rte_width)
addButton($a_button)
Add RTE button.
setUseRte($a_usert, $version='')
Set Use Rich Text Editing.
setRteTagSet($a_set_name)
Set Set of Valid RTE Tags.
setRTESupport($obj_id, $obj_type, $module, $cfg_template=null, $hide_switch=false, $version=null)
Set RTE support for a special module.
removeRTESupport()
Remove RTE support for a special module.
disableButtons($a_button)
Sets buttons which should be disabled in TinyMCE.
getUseTagsForRteOnly()
Get use tags for RTE only (default is true)
setPurifier(ilHtmlPurifierInterface $Purifier)
Setter for the html purifier.
setValue($a_value)
Set Value.
getRteTagSet($a_set_name)
Get Set of Valid RTE Tags.
getPurifier()
Getter for the html purifier.
setRTERootBlockElement($a_root_block_element)
Setter for the TinyMCE root block element.
removePlugin($a_plugin)
Remove RTE plugin.
getRTERootBlockElement()
Getter for the TinyMCE root block element.
getRteTagString()
RTE Tag string.
setValueByArray($a_values)
Set value by array.
insert(&$a_tpl)
Insert property html.
setRows($a_rows)
Set Rows.
removeButton($a_button)
Remove RTE button.
usePurifier($a_flag=null)
Setter/Getter for the html purifier usage.
getDisabledButtons($as_array=true)
Returns the disabled TinyMCE buttons.
setRteTags($a_rtetags)
Set Valid RTE Tags.
setUseTagsForRteOnly($a_val)
Set use tags for RTE only (default is true)
addPlugin($a_plugin)
Add RTE plugin.
checkInput()
Check input, strip slashes etc.
setCols($a_cols)
Set Cols.
__construct($a_title="", $a_postvar="")
Constructor.
getUseRte()
Get Use Rich Text Editing.
getRteTags()
Get Valid RTE Tags.
static stripOnlySlashes($a_str)
strip slashes if magic qoutes is enabled
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
Interface for html sanitizing functionality.