ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
|
Rich Text Editor base class This class provides access methods to a Rich Text Editor (RTE) integrated in ILIAS. More...
Public Member Functions | |
__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 | _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 Attributes | |
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 = [] |
Rich Text Editor base class This class provides access methods to a Rich Text Editor (RTE) integrated in ILIAS.
Definition at line 30 of file class.ilRTE.php.
ilRTE::__construct | ( | ) |
Reimplemented in ilTinyMCE.
Definition at line 58 of file class.ilRTE.php.
References $DIC, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\user().
|
static |
Synchronises appearances of media objects in $a_text with media object usage table.
string | $a_text | text, including media object tags |
string | $a_usage_type | type of context of usage, e.g. cat:html |
int | $a_usage_id | if of context of usage, e.g. category id |
Definition at line 145 of file class.ilRTE.php.
References ilObjMediaObject\_exists(), ilObjMediaObject\_getMobsOfObject(), ilObjMediaObject\_removeUsage(), ilObjMediaObject\_saveUsage(), and ILIAS\Repository\int().
Referenced by assQuestion\cleanupMediaObjectUsage(), and SurveyQuestion\saveToDb().
|
static |
Returns all media objects found in the passed string.
string | $a_text | text, including media object tags |
integer | $a_direction | 0 to find image src, 1 to find mob id |
Definition at line 270 of file class.ilRTE.php.
References ilObjMediaObject\_exists(), and ILIAS\Repository\int().
Referenced by ilObjForumGUI\createThread(), ilObjForumGUI\deleteMobsOfDraft(), ilForumAutoSaveAsyncDraftAction\executeAndGetResponseObject(), and ilObjForumGUI\savePostObject().
|
static |
Definition at line 128 of file class.ilRTE.php.
References $DIC.
Referenced by ilTextAreaInputGUI\insert(), and assTextQuestionGUI\magicAfterTestOutput().
|
static |
Replaces image source from mob image urls with the mob id or replaces mob id with the correct image source.
string | $a_text | text, including media object tags |
integer | $a_direction | 0 to replace image src => mob id, 1 to replace mob id => image src |
string | $nic |
Definition at line 228 of file class.ilRTE.php.
Referenced by assQuestionExport\addQTIMaterial(), ilObjForumGUI\createThread(), ilObjForumGUI\doHistoryCheck(), ilObjForumGUI\editThreadDraftObject(), ilForumAutoSaveAsyncDraftAction\executeAndGetResponseObject(), ilAssSelfAssessmentQuestionFormatter\format(), ilAssMultiOptionQuestionFeedback\getAllSpecificAnswerFeedbackContents(), ilObjTest\getCompleteManualFeedback(), ilObjTest\getFinalStatement(), ilAssQuestionFeedback\getGenericFeedbackContent(), ilObjTest\getIntroduction(), ilObjTest\getSingleManualFeedback(), ilAssMultiOptionQuestionFeedback\getSpecificAnswerFeedbackContent(), assKprimChoice\loadAnswerData(), assErrorText\loadFromDb(), assLongMenu\loadFromDb(), assMatchingQuestion\loadFromDb(), assOrderingHorizontal\loadFromDb(), assOrderingQuestion\loadFromDb(), assKprimChoice\loadFromDb(), ilObjSurvey\loadFromDb(), SurveyMatrixQuestion\loadFromDb(), SurveyMetricQuestion\loadFromDb(), SurveyMultipleChoiceQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), SurveyTextQuestion\loadFromDb(), assClozeTest\loadFromDb(), assFileUpload\loadFromDb(), assFormulaQuestion\loadFromDb(), assImagemapQuestion\loadFromDb(), assMultipleChoice\loadFromDb(), assNumeric\loadFromDb(), assSingleChoice\loadFromDb(), assTextQuestion\loadFromDb(), assTextSubset\loadFromDb(), ilExAssignmentListTextTableGUI\parse(), assQuestionImport\processNonAbstractedImageReferences(), ilObjForumGUI\publishDraftObject(), ilForumExportGUI\renderPostHtml(), ilObjForumGUI\renderPostingForm(), ilObjTest\retrieveMobsFromLegacyImports(), assClozeTest\saveAdditionalQuestionDataToDb(), assMultipleChoice\saveAnswerSpecificDataToDb(), ilObjForumGUI\saveAsDraftObject(), ilAssQuestionFeedback\saveGenericFeedbackContent(), ilObjForumGUI\savePostObject(), assQuestion\saveQuestionDataToDb(), ilAssMultiOptionQuestionFeedback\saveSpecificAnswerFeedbackContent(), ilObjForumGUI\saveThreadAsDraftObject(), ilObjSurvey\saveToDb(), SurveyQuestion\saveToDb(), ilExSubmissionTextGUI\showAssignmentTextObject(), ILIAS\Test\Settings\MainSettings\SettingsMainGUI\showOldConcludingRemarks(), ILIAS\Test\Settings\MainSettings\SettingsMainGUI\showOldIntroduction(), ilForumXMLWriter\start(), assErrorText\toJSON(), assErrorText\toLog(), ilObjTest\toXML(), ilObjForumGUI\updateDraftObject(), and ilObjForumGUI\updateThreadDraftObject().
ilRTE::addButton | ( | string | $a_button_name | ) |
Definition at line 75 of file class.ilRTE.php.
ilRTE::addCustomRTESupport | ( | int | $obj_id, |
string | $obj_type, | ||
array | $tags | ||
) |
Adds custom support for an RTE in an ILIAS form.
int | $obj_id | |
string | $obj_type | |
string[] | $tags |
Reimplemented in ilTinyMCE.
Definition at line 124 of file class.ilRTE.php.
ilRTE::addPlugin | ( | string | $a_plugin_name | ) |
Definition at line 70 of file class.ilRTE.php.
ilRTE::addUserTextEditor | ( | string | $editor_selector | ) |
ilRTE::disableButtons | ( | $a_button | ) |
Sets buttons which should be disabled in the RTE.
string[] | string | $a_button | Either a button string or an array of button strings |
Definition at line 312 of file class.ilRTE.php.
ilRTE::getDisabledButtons | ( | bool | $as_list = true | ) |
Returns the disabled RTE buttons.
bool | $as_list | Should the disabled buttons be returned as a string or as an array |
Definition at line 328 of file class.ilRTE.php.
ilRTE::getInitialWidth | ( | ) |
Definition at line 337 of file class.ilRTE.php.
ilRTE::getRTERootBlockElement | ( | ) |
Definition at line 302 of file class.ilRTE.php.
ilRTE::removeAllPlugins | ( | ) |
Definition at line 88 of file class.ilRTE.php.
References XapiProxy\$plugin, and removePlugin().
ilRTE::removeButton | ( | string | $a_button_name | ) |
Definition at line 95 of file class.ilRTE.php.
ilRTE::removePlugin | ( | string | $a_plugin_name | ) |
Definition at line 80 of file class.ilRTE.php.
Referenced by removeAllPlugins().
|
static |
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.
You can only include text, not tags, as your math delimiters."
This function should called by components that display RTE content.
Definition at line 181 of file class.ilRTE.php.
References ilStr\strIPos(), ilStr\strLen(), and ilStr\subStr().
Referenced by ilAssSelfAssessmentQuestionFormatter\format(), ilAssSelfAssessmentQuestionFormatter\migrateToLmContent(), ilForum\prepareText(), and ilLegacyFormElementsUtil\prepareTextareaOutput().
ilRTE::setInitialWidth | ( | ?int | $initialWidth | ) |
Definition at line 342 of file class.ilRTE.php.
ilRTE::setRTERootBlockElement | ( | ?string | $a_root_block_element | ) |
Definition at line 296 of file class.ilRTE.php.
|
protected |
Definition at line 36 of file class.ilRTE.php.
|
protected |
Definition at line 50 of file class.ilRTE.php.
|
protected |
Definition at line 37 of file class.ilRTE.php.
|
protected |
Definition at line 33 of file class.ilRTE.php.
|
protected |
Definition at line 56 of file class.ilRTE.php.
|
protected |
Definition at line 38 of file class.ilRTE.php.
|
protected |
Definition at line 35 of file class.ilRTE.php.
|
protected |
Definition at line 47 of file class.ilRTE.php.
Referenced by ilTinyMCE\getPlugins().
|
protected |
Definition at line 44 of file class.ilRTE.php.
|
protected |
Definition at line 32 of file class.ilRTE.php.
|
protected |
Definition at line 34 of file class.ilRTE.php.