ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Rich Text Editor base class This class provides access methods to a Rich Text Editor (RTE) integrated in ILIAS. More...
Public Member Functions | |
__construct ($a_version='') | |
ilRTE constructor. More... | |
addPlugin ($a_plugin_name) | |
Adds a plugin to the plugin list. More... | |
addButton ($a_button_name) | |
Adds a button to the button list. More... | |
removePlugin ($a_plugin_name) | |
Removes a plugin from the plugin list. More... | |
removeAllPlugins () | |
Removes all plugins from instance. More... | |
removeButton ($a_button_name) | |
Removes a button from the button list. More... | |
addRTESupport ($obj_id, $obj_type, $a_module="", $allowFormElements=false, $cfg_template=null, $hide_switch=false) | |
Adds support for an RTE in an ILIAS form. More... | |
addUserTextEditor ($editor_selector) | |
Adds support for an user text editor. More... | |
addCustomRTESupport ($obj_id, $obj_type, array $tags) | |
Adds custom support for an RTE in an ILIAS form. More... | |
setRTERootBlockElement ($a_root_block_element) | |
Setter for the RTE root block element. More... | |
getRTERootBlockElement () | |
Getter for the RTE root block element. More... | |
disableButtons ($a_button) | |
Sets buttons which should be disabled in the RTE. More... | |
getDisabledButtons ($as_array=true) | |
Returns the disabled RTE buttons. More... | |
getInitialWidth () | |
setInitialWidth ($initialWidth) | |
Static Public Member Functions | |
static | _getRTEClassname () |
static | _cleanupMediaObjectUsage ($a_text, $a_usage_type, $a_usage_id) |
Synchronises appearances of media objects in $a_text with media object usage table. More... | |
static | _replaceMediaObjectImageSrc ($a_text, $a_direction=0, $nic=IL_INST_ID) |
Replaces image source from mob image urls with the mob id or replaces mob id with the correct image source. More... | |
static | _getMediaObjects ($a_text, $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 | |
$plugins = array() | |
$buttons = array() | |
$tpl | |
$ctrl | |
$user | |
$lng | |
$browser | |
$client_init | |
$initialWidth = null | |
$root_block_element = null | |
$disabled_buttons = array() | |
Rich Text Editor base class This class provides access methods to a Rich Text Editor (RTE) integrated in ILIAS.
Definition at line 12 of file class.ilRTE.php.
ilRTE::__construct | ( | $a_version = '' | ) |
ilRTE constructor.
string | $a_version |
Definition at line 78 of file class.ilRTE.php.
|
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 196 of file class.ilRTE.php.
References $mobs, ilObjMediaObject\_getMobsOfObject(), ilObjMediaObject\_removeUsage(), and ilObjMediaObject\_saveUsage().
Referenced by ilObjTest\cleanupMediaobjectUsage(), assQuestion\cleanupMediaObjectUsage(), ilContainerGUI\savePageContentObject(), 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 266 of file class.ilRTE.php.
References ilObjMediaObject\_exists().
Referenced by ilForumDraftsHistory\addMobsToDraftsHistory(), ilObjForumGUI\createThread(), ilObjForumGUI\deleteMobsOfDraft(), ilForumAutoSaveAsyncDraftAction\executeAndGetResponseObject(), ilForumUtil\moveMediaObjects(), ilObjForumGUI\publishDraftObject(), ilForumUtil\saveMediaObjects(), and ilExSubmissionTextGUI\updateAssignmentTextObject().
|
static |
Definition at line 176 of file class.ilRTE.php.
References ilObjAdvancedEditing\_getRichTextEditor().
Referenced by ilContainerGUI\editPageContentObject(), ilObjForumGUI\getCensorshipFormHTML(), 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 |
Definition at line 228 of file class.ilRTE.php.
References ilObject\_lookupType(), and ilWACSignedPath\signFile().
Referenced by SurveyQuestion\addMaterialTag(), ilObjSurvey\addMaterialTag(), assQuestion\addQTIMaterial(), ilObjTest\addQTIMaterial(), assQuestion\copySuggestedSolutionFiles(), ilObjForumGUI\createThread(), ilObjForumGUI\doCaptchaCheck(), ilObjForumGUI\doHistoryCheck(), ilExSubmissionTextGUI\editAssignmentTextObject(), ilObjForumGUI\editDraftObject(), ilObjForumGUI\editThreadDraftObject(), ilForumAutoSaveAsyncDraftAction\executeAndGetResponseObject(), ilAssSelfAssessmentQuestionFormatter\format(), assLongMenuImport\fromXML(), assKprimChoiceImport\fromXML(), assErrorTextImport\fromXML(), assFileUploadImport\fromXML(), assFlashQuestionImport\fromXML(), assClozeTestImport\fromXML(), assImagemapQuestionImport\fromXML(), assFormulaQuestionImport\fromXML(), assJavaAppletImport\fromXML(), assMultipleChoiceImport\fromXML(), assNumericImport\fromXML(), assOrderingHorizontalImport\fromXML(), assSingleChoiceImport\fromXML(), assTextQuestionImport\fromXML(), assTextSubsetImport\fromXML(), assOrderingQuestionImport\fromXML(), assMatchingQuestionImport\fromXML(), ilObjTest\fromXML(), ilForum\generatePost(), ilAssMultiOptionQuestionFeedback\getAllSpecificAnswerFeedbackContents(), ilAssQuestionFeedback\getGenericFeedbackContent(), ilObjTest\getManualFeedback(), ilAssMultiOptionQuestionFeedback\getSpecificAnswerFeedbackContent(), ilExPeerReviewGUI\getSubmissionContent(), ilObjSurvey\importObject(), ilSurveyImporter\importXmlRepresentation(), assMultipleChoice\isForcedEmptySolution(), ilExerciseManagementGUI\listTextAssignmentObject(), assKprimChoice\loadAnswerData(), assOrderingHorizontal\loadFromDb(), SurveyTextQuestion\loadFromDb(), SurveyMultipleChoiceQuestion\loadFromDb(), assFileUpload\loadFromDb(), assTextQuestion\loadFromDb(), assTextSubset\loadFromDb(), assFlashQuestion\loadFromDb(), assOrderingQuestion\loadFromDb(), assErrorText\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), assClozeTest\loadFromDb(), assKprimChoice\loadFromDb(), assSingleChoice\loadFromDb(), SurveyMetricQuestion\loadFromDb(), assMultipleChoice\loadFromDb(), assMatchingQuestion\loadFromDb(), assJavaApplet\loadFromDb(), assImagemapQuestion\loadFromDb(), assLongMenu\loadFromDb(), SurveyMatrixQuestion\loadFromDb(), assFormulaQuestion\loadFromDb(), ilObjSurvey\loadFromDb(), ilObjTest\loadFromDb(), assQuestion\loadFromDb(), ilExAssignmentListTextTableGUI\parse(), assQuestionImport\processNonAbstractedImageReferences(), ilObjForumGUI\publishDraftObject(), ilObjForumGUI\quotePostObject(), ilObjForumGUI\renderDraftContent(), ilObjForumGUI\renderPostContent(), ilForumExportGUI\renderPostHtml(), assClozeTest\saveAdditionalQuestionDataToDb(), ilAssQuestionFeedback\saveGenericFeedbackContent(), assSingleChoice\savePreviewData(), assQuestion\saveQuestionDataToDb(), ilAssMultiOptionQuestionFeedback\saveSpecificAnswerFeedbackContent(), ilObjForumGUI\saveThreadAsDraftObject(), assNumeric\saveToDb(), ilObjSurvey\saveToDb(), SurveyQuestion\saveToDb(), ilObjTest\saveToDb(), ilExSubmissionTextGUI\showAssignmentTextObject(), ilForumXMLWriter\start(), assErrorText\toJSON(), ilExSubmissionTextGUI\updateAssignmentTextObject(), and ilObjForumGUI\updateThreadDraftObject().
ilRTE::addButton | ( | $a_button_name | ) |
Adds a button to the button list.
string | $a_button_name | The name of the button |
Definition at line 103 of file class.ilRTE.php.
ilRTE::addCustomRTESupport | ( | $obj_id, | |
$obj_type, | |||
array | $tags | ||
) |
Adds custom support for an RTE in an ILIAS form.
$obj_id | integer |
$obj_type | string |
$tags | array |
Definition at line 169 of file class.ilRTE.php.
ilRTE::addPlugin | ( | $a_plugin_name | ) |
Adds a plugin to the plugin list.
string | $a_plugin_name | The name of the plugin |
Definition at line 94 of file class.ilRTE.php.
ilRTE::addRTESupport | ( | $obj_id, | |
$obj_type, | |||
$a_module = "" , |
|||
$allowFormElements = false , |
|||
$cfg_template = null , |
|||
$hide_switch = false |
|||
) |
Adds support for an RTE in an ILIAS form.
$obj_id | integer |
$obj_type | string |
$a_module | string |
$allowFormElements | bool |
$cfg_template | bool |
$hide_switch | bool |
Definition at line 151 of file class.ilRTE.php.
ilRTE::addUserTextEditor | ( | $editor_selector | ) |
Adds support for an user text editor.
$editor_selector | string |
Definition at line 159 of file class.ilRTE.php.
ilRTE::disableButtons | ( | $a_button | ) |
Sets buttons which should be disabled in the RTE.
array | string | $a_button | Either a button string or an array of button strings |
Definition at line 325 of file class.ilRTE.php.
Referenced by ilTinyMCE\addCustomRTESupport(), ilTinyMCE\addInternalTinyMCEImageManager(), ilTinyMCE\handleIliasImageManagerRemoved(), and ilTinyMCE\handleImagePluginsBeforeRendering().
ilRTE::getDisabledButtons | ( | $as_array = true | ) |
Returns the disabled RTE buttons.
bool | $as_array | Should the disabled buttons be returned as a string or as an array |
Definition at line 341 of file class.ilRTE.php.
References $disabled_buttons.
Referenced by ilTinyMCE\_buildAdvancedButtonsFromHTMLTags(), ilTinyMCE\_buildAdvancedTableButtonsFromHTMLTags(), and ilTinyMCE\_buildButtonsFromHTMLTags().
ilRTE::getInitialWidth | ( | ) |
Definition at line 353 of file class.ilRTE.php.
References $initialWidth.
Referenced by ilTinyMCE\addRTESupport().
ilRTE::getRTERootBlockElement | ( | ) |
Getter for the RTE root block element.
Definition at line 315 of file class.ilRTE.php.
References $root_block_element.
Referenced by ilTinyMCE\addCustomRTESupport(), and ilTinyMCE\addRTESupport().
ilRTE::removeAllPlugins | ( | ) |
Removes all plugins from instance.
Definition at line 123 of file class.ilRTE.php.
References removePlugin().
ilRTE::removeButton | ( | $a_button_name | ) |
Removes a button from the button list.
string | $a_button_name | The name of the button |
Definition at line 134 of file class.ilRTE.php.
References $key.
ilRTE::removePlugin | ( | $a_plugin_name | ) |
Removes a plugin from the plugin list.
string | $a_plugin_name | The name of the plugin |
Definition at line 112 of file class.ilRTE.php.
References $key.
Referenced by removeAllPlugins().
ilRTE::setInitialWidth | ( | $initialWidth | ) |
integer | $initialWidth |
Definition at line 361 of file class.ilRTE.php.
References $initialWidth.
ilRTE::setRTERootBlockElement | ( | $a_root_block_element | ) |
Setter for the RTE root block element.
string | $a_root_block_element | Root block element |
Definition at line 305 of file class.ilRTE.php.
|
protected |
Definition at line 50 of file class.ilRTE.php.
|
protected |
Definition at line 25 of file class.ilRTE.php.
|
protected |
Definition at line 55 of file class.ilRTE.php.
|
protected |
Definition at line 35 of file class.ilRTE.php.
|
protected |
Definition at line 72 of file class.ilRTE.php.
Referenced by getDisabledButtons().
|
protected |
Definition at line 60 of file class.ilRTE.php.
Referenced by getInitialWidth(), and setInitialWidth().
|
protected |
Definition at line 45 of file class.ilRTE.php.
|
protected |
Definition at line 20 of file class.ilRTE.php.
|
protected |
Definition at line 66 of file class.ilRTE.php.
Referenced by getRTERootBlockElement().
|
protected |
Definition at line 30 of file class.ilRTE.php.
Referenced by ilTinyMCE\addCustomRTESupport(), and ilTinyMCE\addRTESupport().
|
protected |
Definition at line 40 of file class.ilRTE.php.
const ilRTE::ILIAS_IMG_MANAGER_PLUGIN = 'ilias_image_manager_plugin' |
Definition at line 14 of file class.ilRTE.php.
Referenced by ilSurveyEditorGUI\initHeadingForm(), and ilObjLearningSequenceSettingsGUI\initRTEInput().