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 $this->
ilObject($a_id,$a_call_by_reference);
60 if (!parent::update())
80 if (!parent::delete())
104 function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
144 if ($a_node_id==
$_GET[
"ref_id"])
146 $parent_obj =& $this->
ilias->obj_factory->getInstanceByRefId($a_node_id);
147 $parent_type = $parent_obj->getType();
148 if($parent_type == $this->
getType())
150 $a_node_id = (int) $tree->getParentId($a_node_id);
154 parent::notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params);
168 include_once
"./Services/Administration/classes/class.ilSetting.php";
169 $setting =
new ilSetting(
"advanced_editing");
170 $tags = $setting->get(
"advanced_editing_used_html_tags_" . $a_module);
173 $usedtags = unserialize($tags);
177 if($a_module ==
'frm_post' || $a_module ==
'exc_ass')
234 if($a_module ===
'frm_post')
236 if(!in_array(
'div', $usedtags))
241 if(!in_array(
'blockquote', $usedtags))
243 $usedtags[] =
'blockquote';
262 foreach ($tags as $tag)
278 include_once
"./Services/Administration/classes/class.ilSetting.php";
279 $setting =
new ilSetting(
"advanced_editing");
280 $js = $setting->get(
"advanced_editing_javascript_editor");
293 include_once
"./Services/Administration/classes/class.ilSetting.php";
294 $setting =
new ilSetting(
"advanced_editing");
295 $setting->set(
"advanced_editing_javascript_editor", $a_js_editor);
312 if (strlen($a_module))
314 $auto_added_tags = array();
317 if($a_module ==
'frm_post')
319 if(!in_array(
'div', $a_html_tags))
321 $auto_added_tags[] =
'div';
324 if(!in_array(
'blockquote', $a_html_tags))
326 $auto_added_tags[] =
'blockquote';
330 include_once
"./Services/Administration/classes/class.ilSetting.php";
331 $setting =
new ilSetting(
"advanced_editing");
332 $setting->set(
"advanced_editing_used_html_tags_" . $a_module, serialize(array_merge((array)$a_html_tags, $auto_added_tags)));
334 if(count($auto_added_tags))
336 require_once
'Services/AdvancedEditing/exceptions/class.ilAdvancedEditingRequiredTagsException.php';
339 $lng->txt(
'advanced_editing_required_tags'),
340 implode(
', ', $auto_added_tags)
511 foreach ($tags as $tag)
528 $ilUser->writePref(
"show_rte", $a_state);
542 if (strlen($ilUser->getPref(
"show_rte")) > 0)
544 return $ilUser->getPref(
"show_rte");
_getAllHTMLTagsAsString()
Returns a string of all HTML tags.
ilObjAdvancedEditing($a_id=0, $a_call_by_reference=true)
Constructor public.
& _getUsedHTMLTagsAsString($a_module="")
Returns a string of all allowed HTML tags for text editing.
Class ilObject Basic functions for all objects.
update()
update object data
_getRichTextEditor()
Returns the identifier for the Rich Text Editor.
static _setRichTextEditorUserState($a_state)
Sets the state of the rich text editor visibility for the current user.
ilObject($a_id=0, $a_reference=true)
Constructor public.
_setRichTextEditor($a_js_editor)
Sets wheather a Rich Text Editor should be used or not.
redirection script todo: (a better solution should control the processing via a xml file) ...
getType()
get object type public
& getHTMLTags()
Returns an array of all possible HTML tags for text editing.
Class ilObjAdvancedEditing.
& _getUsedHTMLTags($a_module="")
Returns an array of all allowed HTML tags for text editing.
static _getRichTextEditorUserState()
Gets the state of the rich text editor visibility for the current user.
_setUsedHTMLTags($a_html_tags, $a_module)
Writes an array with allowed HTML tags to the ILIAS settings.
notify($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0)
notifys an object about an event occured Based on the event happend, each object may decide how it re...
& _getAllHTMLTags()
Returns an array of all possible HTML tags for text editing.