27 bool $a_call_by_reference =
true 31 $this->
lng = $DIC->language();
32 $this->setting =
new ilSetting(
"advanced_editing");
44 $setting =
new ilSetting(
"advanced_editing");
45 $tags = $setting->
get(
"advanced_editing_used_html_tags_" . $a_module,
'');
47 $usedtags = unserialize($tags, [
"allowed_classes" =>
false]);
48 } elseif ($a_module ===
'frm_post' || $a_module ===
'exc_ass') {
101 if ($a_module ===
'frm_post') {
102 if (!in_array(
'div', $usedtags,
true)) {
106 if (!in_array(
'blockquote', $usedtags,
true)) {
107 $usedtags[] =
'blockquote';
122 $tags = self::_getUsedHTMLTags($a_module);
123 foreach ($tags as $tag) {
135 return (
new ilSetting(
"advanced_editing"))->get(
"advanced_editing_javascript_editor",
"0");
140 $setting =
new ilSetting(
"advanced_editing");
141 $setting->
set(
"advanced_editing_javascript_editor", $a_js_editor);
156 if ($a_module !==
'') {
157 $auto_added_tags = array();
160 if ($a_module ===
'frm_post') {
161 if (!in_array(
'div', $a_html_tags,
true)) {
162 $auto_added_tags[] =
'div';
165 if (!in_array(
'blockquote', $a_html_tags,
true)) {
166 $auto_added_tags[] =
'blockquote';
170 $setting =
new ilSetting(
"advanced_editing");
171 $setting->
set(
"advanced_editing_used_html_tags_" . $a_module, serialize(array_merge($a_html_tags, $auto_added_tags)));
173 if (count($auto_added_tags)) {
176 $lng->
txt(
'advanced_editing_required_tags'),
177 implode(
', ', $auto_added_tags)
339 $ilUser->writePref(
"show_rte", (
string) $a_state);
351 if (
$ilUser->getPref(
"show_rte") !=
'') {
352 return (
int)
$ilUser->getPref(
"show_rte");
get(string $a_keyword, ?string $a_default_value=null)
get setting
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _getRichTextEditor()
Returns the identifier for the Rich Text Editor.
static _getAllHTMLTags()
Returns an array of all possible HTML tags for text editing.
set(string $a_key, string $a_val)
static _setRichTextEditorUserState(int $a_state)
Sets the state of the rich text editor visibility for the current user.
setUsedHTMLTags(array $a_html_tags, string $a_module)
Writes an array with allowed HTML tags to the ILIAS settings.
static _getUsedHTMLTagsAsString(string $a_module="")
Returns a string of all allowed HTML tags for text editing.
& getHTMLTags()
Returns an array of all possible HTML tags for text editing.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
static _getRichTextEditorUserState()
Gets the state of the rich text editor visibility for the current user.
setRichTextEditor(string $a_js_editor)
__construct(int $a_id=0, bool $a_call_by_reference=true)
static _getUsedHTMLTags(string $a_module="")
Returns an array of all allowed HTML tags for text editing.