ILIAS
release_8 Revision v8.23
|
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 (int $obj_id, string $obj_type, string $a_module='', bool $allowFormElements=false, ?string $cfg_template=null, bool $hide_switch=false) | |
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 | _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... | |
Data Fields | |
const | ILIAS_IMG_MANAGER_PLUGIN = 'ilias_image_manager_plugin' |
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 29 of file class.ilRTE.php.
ilRTE::__construct | ( | ) |
Definition at line 59 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 144 of file class.ilRTE.php.
References $mobs, ilObjMediaObject\_getMobsOfObject(), ilObjMediaObject\_removeUsage(), ilObjMediaObject\_saveUsage(), CLIENT_ID, and ILIAS\Repository\int().
Referenced by ilObjTest\cleanupMediaobjectUsage(), 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 222 of file class.ilRTE.php.
References ilObjMediaObject\_exists(), and ILIAS\Repository\int().
Referenced by ilObjForumGUI\createThread(), ilObjForumGUI\deleteMobsOfDraft(), ilForumAutoSaveAsyncDraftAction\executeAndGetResponseObject(), ilForumUtil\moveMediaObjects(), ilForumUtil\saveMediaObjects(), ilObjForumGUI\savePostObject(), and ilExSubmissionTextGUI\updateAssignmentTextObject().
|
static |
Definition at line 128 of file class.ilRTE.php.
References ilObjAdvancedEditing\_getRichTextEditor().
Referenced by ilObjForumGUI\initReplyEditForm(), 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 177 of file class.ilRTE.php.
References ilObject\_lookupType(), CLIENT_ID, IL_INST_ID, and ilWACSignedPath\signFile().
Referenced by SurveyQuestion\addMaterialTag(), ilObjSurvey\addMaterialTag(), assQuestion\addQTIMaterial(), ilObjTest\addQTIMaterial(), ilExerciseManagementGUI\collectFeedbackDataFromPeer(), ilObjForumGUI\createThread(), ilObjForumGUI\doHistoryCheck(), ilExSubmissionTextGUI\editAssignmentTextObject(), ilObjForumGUI\editThreadDraftObject(), ilForumAutoSaveAsyncDraftAction\executeAndGetResponseObject(), ilAssSelfAssessmentQuestionFormatter\format(), assLongMenuImport\fromXML(), assKprimChoiceImport\fromXML(), assErrorTextImport\fromXML(), assFileUploadImport\fromXML(), assFlashQuestionImport\fromXML(), assClozeTestImport\fromXML(), assFormulaQuestionImport\fromXML(), assImagemapQuestionImport\fromXML(), assMultipleChoiceImport\fromXML(), assNumericImport\fromXML(), assOrderingHorizontalImport\fromXML(), assSingleChoiceImport\fromXML(), assTextSubsetImport\fromXML(), assOrderingQuestionImport\fromXML(), assTextQuestionImport\fromXML(), assMatchingQuestionImport\fromXML(), ilObjTest\fromXML(), ilAssMultiOptionQuestionFeedback\getAllSpecificAnswerFeedbackContents(), ilObjTest\getCompleteManualFeedback(), ilAssQuestionFeedback\getGenericFeedbackContent(), ilForum\getOneThread(), ilObjForumGUI\getQuotationHTMLAsynchObject(), ilObjTest\getSingleManualFeedback(), ilAssMultiOptionQuestionFeedback\getSpecificAnswerFeedbackContent(), ilExPeerReviewGUI\getSubmissionContent(), ilSurveyImporter\getSurvey(), ilObjTest\insertManualFeedback(), assMultipleChoice\isForcedEmptySolution(), assKprimChoice\loadAnswerData(), SurveyMultipleChoiceQuestion\loadFromDb(), SurveyTextQuestion\loadFromDb(), SurveyMetricQuestion\loadFromDb(), assOrderingHorizontal\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), assTextSubset\loadFromDb(), assFileUpload\loadFromDb(), assFlashQuestion\loadFromDb(), assTextQuestion\loadFromDb(), assOrderingQuestion\loadFromDb(), assErrorText\loadFromDb(), assSingleChoice\loadFromDb(), assClozeTest\loadFromDb(), assKprimChoice\loadFromDb(), assMultipleChoice\loadFromDb(), SurveyMatrixQuestion\loadFromDb(), assMatchingQuestion\loadFromDb(), assImagemapQuestion\loadFromDb(), assLongMenu\loadFromDb(), assFormulaQuestion\loadFromDb(), ilObjSurvey\loadFromDb(), ilObjTest\loadFromDb(), assQuestion\loadFromDb(), ilExAssignmentListTextTableGUI\parse(), assQuestionImport\processNonAbstractedImageReferences(), ilObjForumGUI\publishDraftObject(), ilObjForumGUI\renderDraftContent(), ilObjForumGUI\renderPostContent(), ilForumExportGUI\renderPostHtml(), assClozeTest\saveAdditionalQuestionDataToDb(), ilObjForumGUI\saveAsDraftObject(), ilAssQuestionFeedback\saveGenericFeedbackContent(), ilObjForumGUI\savePostObject(), assSingleChoice\savePreviewData(), assQuestion\saveQuestionDataToDb(), ilAssMultiOptionQuestionFeedback\saveSpecificAnswerFeedbackContent(), ilObjForumGUI\saveThreadAsDraftObject(), assNumeric\saveToDb(), SurveyQuestion\saveToDb(), ilObjSurvey\saveToDb(), ilObjTest\saveToDb(), ilExSubmissionTextGUI\showAssignmentTextObject(), ilForumXMLWriter\start(), assErrorText\toJSON(), ilExSubmissionTextGUI\updateAssignmentTextObject(), ilObjForumGUI\updateDraftObject(), assQuestion\updateSuggestedSolutions(), and ilObjForumGUI\updateThreadDraftObject().
ilRTE::addButton | ( | string | $a_button_name | ) |
Definition at line 76 of file class.ilRTE.php.
Referenced by ilTinyMCE\addInternalTinyMCEImageManager().
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 |
Definition at line 124 of file class.ilRTE.php.
ilRTE::addPlugin | ( | string | $a_plugin_name | ) |
Definition at line 71 of file class.ilRTE.php.
ilRTE::addRTESupport | ( | int | $obj_id, |
string | $obj_type, | ||
string | $a_module = '' , |
||
bool | $allowFormElements = false , |
||
?string | $cfg_template = null , |
||
bool | $hide_switch = false |
||
) |
Definition at line 104 of file class.ilRTE.php.
ilRTE::addUserTextEditor | ( | string | $editor_selector | ) |
Definition at line 114 of file class.ilRTE.php.
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 264 of file class.ilRTE.php.
Referenced by ilTinyMCE\addCustomRTESupport(), ilTinyMCE\addInternalTinyMCEImageManager(), ilTinyMCE\handleIliasImageManagerRemoved(), and ilTinyMCE\handleImagePluginsBeforeRendering().
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 280 of file class.ilRTE.php.
References $disabled_buttons.
Referenced by ilTinyMCE\_buildAdvancedButtonsFromHTMLTags(), ilTinyMCE\_buildAdvancedTableButtonsFromHTMLTags(), and ilTinyMCE\_buildButtonsFromHTMLTags().
ilRTE::getInitialWidth | ( | ) |
Definition at line 289 of file class.ilRTE.php.
References $initialWidth.
Referenced by ilTinyMCE\addRTESupport().
ilRTE::getRTERootBlockElement | ( | ) |
Definition at line 254 of file class.ilRTE.php.
References $root_block_element.
Referenced by ilTinyMCE\addCustomRTESupport(), and ilTinyMCE\addRTESupport().
ilRTE::removeAllPlugins | ( | ) |
Definition at line 89 of file class.ilRTE.php.
References XapiProxy\$plugin, and removePlugin().
ilRTE::removeButton | ( | string | $a_button_name | ) |
ilRTE::removePlugin | ( | string | $a_plugin_name | ) |
Definition at line 81 of file class.ilRTE.php.
References ILIAS\LTI\ToolProvider\$key.
Referenced by removeAllPlugins().
ilRTE::setInitialWidth | ( | ?int | $initialWidth | ) |
ilRTE::setRTERootBlockElement | ( | ?string | $a_root_block_element | ) |
Definition at line 248 of file class.ilRTE.php.
|
protected |
Definition at line 37 of file class.ilRTE.php.
|
protected |
Definition at line 51 of file class.ilRTE.php.
|
protected |
Definition at line 38 of file class.ilRTE.php.
|
protected |
Definition at line 34 of file class.ilRTE.php.
|
protected |
Definition at line 57 of file class.ilRTE.php.
Referenced by getDisabledButtons().
|
protected |
Definition at line 39 of file class.ilRTE.php.
Referenced by getInitialWidth(), and setInitialWidth().
|
protected |
Definition at line 36 of file class.ilRTE.php.
Referenced by ilTinyMCE\addRTESupport().
|
protected |
Definition at line 48 of file class.ilRTE.php.
Referenced by ilTinyMCE\getPlugins().
|
protected |
Definition at line 45 of file class.ilRTE.php.
Referenced by getRTERootBlockElement().
|
protected |
Definition at line 33 of file class.ilRTE.php.
Referenced by ilTinyMCE\addCustomRTESupport(), and ilTinyMCE\addRTESupport().
|
protected |
Definition at line 35 of file class.ilRTE.php.
const ilRTE::ILIAS_IMG_MANAGER_PLUGIN = 'ilias_image_manager_plugin' |
Definition at line 31 of file class.ilRTE.php.
Referenced by ilSurveyEditorGUI\initHeadingForm().