24 require_once
"./Services/Object/classes/class.ilObject.php";
46 include_once
"./Services/Administration/classes/class.ilSetting.php";
47 $this->setting =
new ilSetting(
"advanced_editing");
49 parent::__construct($a_id,$a_call_by_reference);
60 if (!parent::update())
80 if (!parent::delete())
101 include_once
"./Services/Administration/classes/class.ilSetting.php";
102 $setting =
new ilSetting(
"advanced_editing");
103 $tags = $setting->get(
"advanced_editing_used_html_tags_" . $a_module);
106 $usedtags = unserialize($tags);
110 if($a_module ==
'frm_post' || $a_module ==
'exc_ass')
167 if($a_module ===
'frm_post')
169 if(!in_array(
'div', $usedtags))
174 if(!in_array(
'blockquote', $usedtags))
176 $usedtags[] =
'blockquote';
195 foreach ($tags as $tag)
211 include_once
"./Services/Administration/classes/class.ilSetting.php";
212 $setting =
new ilSetting(
"advanced_editing");
213 $js = $setting->get(
"advanced_editing_javascript_editor");
226 include_once
"./Services/Administration/classes/class.ilSetting.php";
227 $setting =
new ilSetting(
"advanced_editing");
228 $setting->set(
"advanced_editing_javascript_editor", $a_js_editor);
245 if (strlen($a_module))
247 $auto_added_tags =
array();
250 if($a_module ==
'frm_post')
252 if(!in_array(
'div', $a_html_tags))
254 $auto_added_tags[] =
'div';
257 if(!in_array(
'blockquote', $a_html_tags))
259 $auto_added_tags[] =
'blockquote';
263 include_once
"./Services/Administration/classes/class.ilSetting.php";
264 $setting =
new ilSetting(
"advanced_editing");
265 $setting->set(
"advanced_editing_used_html_tags_" . $a_module, serialize(array_merge((
array)$a_html_tags, $auto_added_tags)));
267 if(count($auto_added_tags))
269 require_once
'Services/AdvancedEditing/exceptions/class.ilAdvancedEditingRequiredTagsException.php';
272 $lng->txt(
'advanced_editing_required_tags'),
273 implode(
', ', $auto_added_tags)
444 $ilUser->writePref(
"show_rte", $a_state);
458 if (strlen($ilUser->getPref(
"show_rte")) > 0)
460 return $ilUser->getPref(
"show_rte");
static _getUsedHTMLTagsAsString($a_module="")
Returns a string of all allowed HTML tags for text editing.
static _getRichTextEditor()
Returns the identifier for the Rich Text Editor.
static _getAllHTMLTags()
Returns an array of all possible HTML tags for text editing.
Class ilObject Basic functions for all objects.
setUsedHTMLTags($a_html_tags, $a_module)
Writes an array with allowed HTML tags to the ILIAS settings.
update()
update object data
static _getUsedHTMLTags($a_module="")
Returns an array of all allowed HTML tags for text editing.
static _setRichTextEditorUserState($a_state)
Sets the state of the rich text editor visibility for the current user.
Create styles array
The data for the language used.
& getHTMLTags()
Returns an array of all possible HTML tags for text editing.
Class ilObjAdvancedEditing.
setRichTextEditor($a_js_editor)
Sets wheather a Rich Text Editor should be used or not.
static _getRichTextEditorUserState()
Gets the state of the rich text editor visibility for the current user.
__construct($a_id=0, $a_call_by_reference=true)
Constructor public.