Definition at line 23 of file ilRTESettings.php.
◆ __construct()
ilRTESettings::__construct |
( |
private readonly Language |
$lng, |
|
|
private readonly ?ilObjUser |
$current_user = null |
|
) |
| |
◆ _getUsedHTMLTags()
static ilRTESettings::_getUsedHTMLTags |
( |
string |
$module = '' | ) |
|
|
static |
Definition at line 126 of file ilRTESettings.php.
Referenced by ilWebDAVMountInstructionsDocumentPurifier\__construct(), ilAccessibilityDocumentHtmlPurifier\__construct(), ILIAS\LegalDocuments\HTMLPurifier\__construct(), assQuestionGUI\addBasicQuestionFormProperties(), ilTinyMCE\addRTESupport(), ilAssQuestionFeedback\buildFeedbackContentFormProperty(), ilAssHtmlPurifier\getElementsUsedForAdvancedEditing(), ilHtmlForumPostPurifier\getPurifierConfigInstance(), ilUserImportParser\importEndTag(), ilRTESettingsGUI\initTagsForm(), assLongMenuGUI\populateQuestionSpecificFormPart(), assClozeTestGUI\populateQuestionSpecificFormPart(), and ilExSubmissionTextGUI\updateAssignmentTextObject().
128 $tags = (
new ilSetting(
'advanced_editing'))->
get(
'advanced_editing_used_html_tags_' . $module,
'');
131 if ($module ===
'frm_post' || $module ===
'exc_ass') {
132 return self::DEFAULT_FORUM_AND_EXERCISE_TAGS;
134 return self::DEFAULT_TAGS;
137 $usedtags = unserialize($tags, [
'allowed_classes' =>
false]);
138 if ($module !==
'frm_post') {
142 if (!in_array(
'div', $usedtags,
true)) {
146 if (!in_array(
'blockquote', $usedtags,
true)) {
147 $usedtags[] =
'blockquote';
◆ _getUsedHTMLTagsAsString()
static ilRTESettings::_getUsedHTMLTagsAsString |
( |
string |
$module = '' | ) |
|
|
static |
◆ getAllAvailableHTMLTags()
ilRTESettings::getAllAvailableHTMLTags |
( |
| ) |
|
◆ getRichTextEditor()
ilRTESettings::getRichTextEditor |
( |
| ) |
|
Definition at line 162 of file ilRTESettings.php.
164 return $this->advanced_editing->get(
'advanced_editing_javascript_editor',
'0');
◆ getRichTextEditorUserState()
ilRTESettings::getRichTextEditorUserState |
( |
| ) |
|
Definition at line 216 of file ilRTESettings.php.
219 if ($this->current_user->getPref(
'show_rte') !==
'') {
220 return (
int) $this->current_user->getPref(
'show_rte');
◆ setRichTextEditor()
ilRTESettings::setRichTextEditor |
( |
string |
$js_editor | ) |
|
Definition at line 167 of file ilRTESettings.php.
169 $this->advanced_editing->set(
'advanced_editing_javascript_editor', $js_editor);
◆ setRichTextEditorUserState()
ilRTESettings::setRichTextEditorUserState |
( |
int |
$state | ) |
|
Definition at line 211 of file ilRTESettings.php.
213 $this->current_user->writePref(
'show_rte', (
string) $state);
◆ setUsedHTMLTags()
ilRTESettings::setUsedHTMLTags |
( |
array |
$html_tags, |
|
|
string |
$module |
|
) |
| |
Definition at line 172 of file ilRTESettings.php.
References ILIAS\Repository\lng().
176 if ($module ===
'') {
180 $auto_added_tags = [];
181 if ($module ===
'frm_post') {
182 if (!in_array(
'div', $html_tags,
true)) {
183 $auto_added_tags[] =
'div';
186 if (!in_array(
'blockquote', $html_tags,
true)) {
187 $auto_added_tags[] =
'blockquote';
191 $this->advanced_editing->set(
192 'advanced_editing_used_html_tags_' . $module,
193 serialize(array_merge($html_tags, $auto_added_tags))
196 if ($auto_added_tags !== []) {
199 $this->
lng->txt(
'advanced_editing_required_tags'),
200 implode(
', ', $auto_added_tags)
◆ $advanced_editing
◆ ALL_AVAILABLE_TAGS
const ilRTESettings::ALL_AVAILABLE_TAGS |
|
private |
◆ DEFAULT_FORUM_AND_EXERCISE_TAGS
const ilRTESettings::DEFAULT_FORUM_AND_EXERCISE_TAGS |
|
private |
Initial value:= [
'a',
'blockquote',
'br',
'code',
'div',
'em',
'img',
'li',
'ol',
'p',
'strong',
'u',
'ul',
'span'
]
Definition at line 100 of file ilRTESettings.php.
◆ DEFAULT_TAGS
const ilRTESettings::DEFAULT_TAGS |
|
private |
The documentation for this class was generated from the following file: