ILIAS
trunk Revision v11.0_alpha-2662-g519ff7d528f
|
Tiny MCE editor class. More...
Public Member Functions | |
__construct () | |
getPlugins () | |
addRTESupport (Language $lng, ilObjUser $user, int $obj_id, string $obj_type, string $a_module='', bool $allowFormElements=false, ?string $cfg_template=null) | |
addContextmenuItem (string $item='') | |
removeAllContextMenuItems () | |
addCustomRTESupport (int $obj_id, string $obj_type, array $tags) | |
addUserTextEditor (string $editor_selector) | |
getStyleSelect () | |
_buildAdvancedBlockformatsFromHTMLTags (array $a_html_tags) | |
_buildAdvancedButtonsFromHTMLTags (int $a_buttons_section, array $a_html_tags) | |
_buildAdvancedTableButtonsFromHTMLTags (array $a_html_tags) | |
_getValidElementsFromHTMLTags (array $a_html_tags) | |
![]() | |
__construct () | |
addPlugin (string $a_plugin_name) | |
addButton (string $a_button_name) | |
removePlugin (string $a_plugin_name) | |
removeAllPlugins () | |
removeButton (string $a_button_name) | |
addRTESupport (Language $lng, ilObjUser $user, int $obj_id, string $obj_type, string $a_module='', bool $allowFormElements=false, ?string $cfg_template=null) | |
addUserTextEditor (string $editor_selector) | |
addCustomRTESupport (int $obj_id, string $obj_type, array $tags) | |
Adds custom support for an RTE in an ILIAS form. More... | |
setRTERootBlockElement (?string $a_root_block_element) | |
getRTERootBlockElement () | |
disableButtons ($a_button) | |
Sets buttons which should be disabled in the RTE. More... | |
getDisabledButtons (bool $as_list=true) | |
Returns the disabled RTE buttons. More... | |
getInitialWidth () | |
setInitialWidth (?int $initialWidth) | |
Static Public Member Functions | |
static | removeRedundantSeparators (string $a_string) |
Removes redundant seperators and removes ,, and , at the first or last position of the string. More... | |
![]() | |
static | _getRTEClassname () |
static | _cleanupMediaObjectUsage (string $a_text, string $a_usage_type, int $a_usage_id) |
Synchronises appearances of media objects in $a_text with media object usage table. More... | |
static | replaceLatexSpan (string $text) |
Replace the latex delimiters used by the rich text editor Unfortunately these can't be processed by MathJax: "Note that the delimiters can’t look like HTML tags (i.e., can’t include the less-than sign), as these would be turned into tags by the browser before MathJax has the chance to run. More... | |
static | _replaceMediaObjectImageSrc (string $a_text, int $a_direction=0, string $nic='') |
Replaces image source from mob image urls with the mob id or replaces mob id with the correct image source. More... | |
static | _getMediaObjects (string $a_text, int $a_direction=0) |
Returns all media objects found in the passed string. More... | |
Protected Member Functions | |
getButtonsForUserTextEditor (array $buttontags) | |
setStyleSelect (bool $a_styleselect) | |
_buildButtonsFromHTMLTags (array $a_html_tags) | |
_getEditorLanguage () | |
Protected Attributes | |
string | $mode = 'textareas' |
string | $version = '' |
bool | $styleselect = false |
bool | $remove_img_context_menu_item = false |
array | $contextMenuItems |
![]() | |
ilGlobalTemplateInterface | $tpl |
ilCtrlInterface | $ctrl |
ilObjUser | $user |
ilLanguage | $lng |
AgentDetermination | $browser |
ilIniFile | $client_init |
int | $initialWidth = null |
string | $root_block_element = null |
array | $plugins = [] |
array | $buttons = [] |
array | $disabled_buttons = [] |
Static Protected Attributes | |
static bool | $renderedToGlobalTemplate = false |
Tiny MCE editor class.
This class provides access methods for Tiny MCE
Definition at line 32 of file class.ilTinyMCE.php.
ilTinyMCE::__construct | ( | ) |
Definition at line 45 of file class.ilTinyMCE.php.
References ILIAS\GlobalScreen\Provider\__construct(), and setStyleSelect().
ilTinyMCE::_buildAdvancedBlockformatsFromHTMLTags | ( | array | $a_html_tags | ) |
string[] | $a_html_tags |
Definition at line 270 of file class.ilTinyMCE.php.
Referenced by _buildAdvancedButtonsFromHTMLTags(), _buildButtonsFromHTMLTags(), addCustomRTESupport(), and addRTESupport().
ilTinyMCE::_buildAdvancedButtonsFromHTMLTags | ( | int | $a_buttons_section, |
array | $a_html_tags | ||
) |
int | $a_buttons_section | |
string[] | $a_html_tags |
Definition at line 316 of file class.ilTinyMCE.php.
References $res, _buildAdvancedBlockformatsFromHTMLTags(), and ilRTE\getDisabledButtons().
Referenced by addCustomRTESupport(), and addRTESupport().
ilTinyMCE::_buildAdvancedTableButtonsFromHTMLTags | ( | array | $a_html_tags | ) |
string[] | $a_html_tags |
Definition at line 526 of file class.ilTinyMCE.php.
References $res, and ilRTE\getDisabledButtons().
Referenced by addCustomRTESupport(), and addRTESupport().
|
protected |
string[] | $a_html_tags |
Definition at line 438 of file class.ilTinyMCE.php.
References $res, _buildAdvancedBlockformatsFromHTMLTags(), and ilRTE\getDisabledButtons().
Referenced by getButtonsForUserTextEditor().
|
protected |
Definition at line 549 of file class.ilTinyMCE.php.
References $lang, and ILIAS\Repository\user().
Referenced by addCustomRTESupport(), addRTESupport(), and addUserTextEditor().
ilTinyMCE::_getValidElementsFromHTMLTags | ( | array | $a_html_tags | ) |
string[] | $a_html_tags |
Definition at line 582 of file class.ilTinyMCE.php.
Referenced by addCustomRTESupport(), addRTESupport(), and addUserTextEditor().
ilTinyMCE::addContextmenuItem | ( | string | $item = '' | ) |
Definition at line 158 of file class.ilTinyMCE.php.
ilTinyMCE::addCustomRTESupport | ( | int | $obj_id, |
string | $obj_type, | ||
array | $tags | ||
) |
Definition at line 170 of file class.ilTinyMCE.php.
References $_COOKIE, ilRTE\$tpl, _buildAdvancedBlockformatsFromHTMLTags(), _buildAdvancedButtonsFromHTMLTags(), _buildAdvancedTableButtonsFromHTMLTags(), _getEditorLanguage(), _getValidElementsFromHTMLTags(), CLIENT_ID, ilRTE\disableButtons(), ILIAS\UICore\GlobalTemplate\get(), ilFileUtils\getFileSizeInfo(), ilUtil\getNewContentStyleSheetLocation(), ilRTE\getRTERootBlockElement(), getStyleSelect(), null, ILIAS\UICore\GlobalTemplate\parseCurrentBlock(), ILIAS\UICore\GlobalTemplate\setCurrentBlock(), and ILIAS\UICore\GlobalTemplate\setVariable().
ilTinyMCE::addRTESupport | ( | Language | $lng, |
ilObjUser | $user, | ||
int | $obj_id, | ||
string | $obj_type, | ||
string | $a_module = '' , |
||
bool | $allowFormElements = false , |
||
?string | $cfg_template = null |
||
) |
Definition at line 79 of file class.ilTinyMCE.php.
References $_COOKIE, ilRTE\$tpl, _buildAdvancedBlockformatsFromHTMLTags(), _buildAdvancedButtonsFromHTMLTags(), _buildAdvancedTableButtonsFromHTMLTags(), _getEditorLanguage(), ilRTESettings\_getUsedHTMLTags(), _getValidElementsFromHTMLTags(), ILIAS\UICore\GlobalTemplate\blockExists(), CLIENT_ID, ILIAS\UICore\GlobalTemplate\get(), ilFileUtils\getFileSizeInfo(), ilRTE\getInitialWidth(), ilUtil\getNewContentStyleSheetLocation(), ilRTE\getRTERootBlockElement(), getStyleSelect(), ilUtil\getStyleSheetLocation(), null, ILIAS\UICore\GlobalTemplate\parseCurrentBlock(), ILIAS\UICore\GlobalTemplate\setCurrentBlock(), ILIAS\UICore\GlobalTemplate\setVariable(), and ILIAS\UICore\GlobalTemplate\touchBlock().
ilTinyMCE::addUserTextEditor | ( | string | $editor_selector | ) |
Definition at line 213 of file class.ilTinyMCE.php.
References _getEditorLanguage(), _getValidElementsFromHTMLTags(), getButtonsForUserTextEditor(), ilUtil\getNewContentStyleSheetLocation(), getStyleSelect(), and ilUtil\getStyleSheetLocation().
|
protected |
string[] | $buttontags |
Definition at line 244 of file class.ilTinyMCE.php.
References _buildButtonsFromHTMLTags().
Referenced by addUserTextEditor().
ilTinyMCE::getPlugins | ( | ) |
ilTinyMCE::getStyleSelect | ( | ) |
Definition at line 261 of file class.ilTinyMCE.php.
References $styleselect.
Referenced by addCustomRTESupport(), addRTESupport(), and addUserTextEditor().
ilTinyMCE::removeAllContextMenuItems | ( | ) |
Definition at line 165 of file class.ilTinyMCE.php.
|
static |
Removes redundant seperators and removes ,, and , at the first or last position of the string.
string | $a_string | A string |
Definition at line 1042 of file class.ilTinyMCE.php.
|
protected |
Definition at line 256 of file class.ilTinyMCE.php.
Referenced by __construct().
|
protected |
Definition at line 43 of file class.ilTinyMCE.php.
|
protected |
Definition at line 36 of file class.ilTinyMCE.php.
|
protected |
Definition at line 39 of file class.ilTinyMCE.php.
|
staticprotected |
Definition at line 34 of file class.ilTinyMCE.php.
|
protected |
Definition at line 38 of file class.ilTinyMCE.php.
Referenced by getStyleSelect().
|
protected |
Definition at line 37 of file class.ilTinyMCE.php.