ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
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 200 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 277 of file class.ilRTE.php.
References ilObjMediaObject\_exists(), and array.
Referenced by ilForumDraftsHistory\addMobsToDraftsHistory(), ilObjForumGUI\autosaveDraftAsyncObject(), ilObjForumGUI\autosaveThreadDraftAsyncObject(), ilObjForumGUI\createThreadObject(), ilObjForumGUI\deleteMobsOfDraft(), ilForumUtil\moveMediaObjects(), ilObjForumGUI\publishDraftObject(), ilForumUtil\saveMediaObjects(), and ilExSubmissionTextGUI\updateAssignmentTextObject().
|
static |
Definition at line 179 of file class.ilRTE.php.
References ilObjAdvancedEditing\_getRichTextEditor().
Referenced by ilObjForumGUI\cancelDraftObject(), ilContainerGUI\editPageContentObject(), 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 237 of file class.ilRTE.php.
References ilObject\_lookupType(), and ilWACSignedPath\signFile().
Referenced by SurveyQuestion\addMaterialTag(), ilObjSurvey\addMaterialTag(), assQuestion\addQTIMaterial(), ilObjTest\addQTIMaterial(), ilObjForumGUI\autosaveDraftAsyncObject(), ilObjForumGUI\autosaveThreadDraftAsyncObject(), assQuestion\copySuggestedSolutionFiles(), ilObjForumGUI\createThreadObject(), ilObjForumGUI\deliverZipFileObject(), ilObjForumGUI\doHistoryCheck(), ilExSubmissionTextGUI\editAssignmentTextObject(), ilObjForumGUI\editDraftObject(), ilForumExportGUI\executeCommand(), ilAssSelfAssessmentQuestionFormatter\format(), assLongMenuImport\fromXML(), assKprimChoiceImport\fromXML(), assErrorTextImport\fromXML(), assFileUploadImport\fromXML(), assFlashQuestionImport\fromXML(), assClozeTestImport\fromXML(), assImagemapQuestionImport\fromXML(), assFormulaQuestionImport\fromXML(), assMultipleChoiceImport\fromXML(), assNumericImport\fromXML(), assSingleChoiceImport\fromXML(), assOrderingHorizontalImport\fromXML(), assTextSubsetImport\fromXML(), assTextQuestionImport\fromXML(), assJavaAppletImport\fromXML(), assOrderingQuestionImport\fromXML(), assMatchingQuestionImport\fromXML(), ilObjTest\fromXML(), ilForum\generatePost(), ilAssMultiOptionQuestionFeedback\getAllSpecificAnswerFeedbackContents(), ilObjForumGUI\getForumObjects(), ilAssQuestionFeedback\getGenericFeedbackContent(), ilObjTest\getManualFeedback(), ilAssMultiOptionQuestionFeedback\getSpecificAnswerFeedbackContent(), ilExPeerReviewGUI\getSubmissionContent(), ilObjForumGUI\getSubTabs(), ilObjSurvey\importObject(), ilSurveyImporter\importXmlRepresentation(), assKprimChoice\loadAnswerData(), SurveyTextQuestion\loadFromDb(), assOrderingHorizontal\loadFromDb(), SurveyMultipleChoiceQuestion\loadFromDb(), assFileUpload\loadFromDb(), assTextQuestion\loadFromDb(), assTextSubset\loadFromDb(), assFlashQuestion\loadFromDb(), assErrorText\loadFromDb(), assOrderingQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), assClozeTest\loadFromDb(), assKprimChoice\loadFromDb(), assSingleChoice\loadFromDb(), SurveyMetricQuestion\loadFromDb(), assMultipleChoice\loadFromDb(), assMatchingQuestion\loadFromDb(), assJavaApplet\loadFromDb(), assLongMenu\loadFromDb(), assImagemapQuestion\loadFromDb(), SurveyMatrixQuestion\loadFromDb(), assFormulaQuestion\loadFromDb(), ilObjSurvey\loadFromDb(), ilObjTest\loadFromDb(), assQuestion\loadFromDb(), ilExAssignmentListTextTableGUI\parse(), assQuestionImport\processNonAbstractedImageReferences(), ilObjForumGUI\publishDraftObject(), ilObjForumGUI\quotePostObject(), ilObjForumGUI\restoreFromHistoryObject(), assClozeTest\saveAdditionalQuestionDataToDb(), ilAssQuestionFeedback\saveGenericFeedbackContent(), assSingleChoice\savePreviewData(), assQuestion\saveQuestionDataToDb(), ilAssMultiOptionQuestionFeedback\saveSpecificAnswerFeedbackContent(), assNumeric\saveToDb(), ilObjSurvey\saveToDb(), SurveyQuestion\saveToDb(), ilObjTest\saveToDb(), ilExSubmissionTextGUI\showAssignmentTextObject(), ilForumXMLWriter\start(), assErrorText\toJSON(), ilExSubmissionTextGUI\updateAssignmentTextObject(), and assMultipleChoice\validateSolutionSubmit().
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 172 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 154 of file class.ilRTE.php.
ilRTE::addUserTextEditor | ( | $editor_selector | ) |
Adds support for an user text editor.
$editor_selector | string |
Definition at line 162 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 341 of file class.ilRTE.php.
References array.
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 360 of file class.ilRTE.php.
References $disabled_buttons.
Referenced by ilTinyMCE\_buildAdvancedButtonsFromHTMLTags(), ilTinyMCE\_buildAdvancedTableButtonsFromHTMLTags(), and ilTinyMCE\_buildButtonsFromHTMLTags().
ilRTE::getInitialWidth | ( | ) |
Definition at line 375 of file class.ilRTE.php.
References $initialWidth.
Referenced by ilTinyMCE\addRTESupport().
ilRTE::getRTERootBlockElement | ( | ) |
Getter for the RTE root block element.
Definition at line 331 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 124 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 136 of file class.ilRTE.php.
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.
Referenced by removeAllPlugins().
ilRTE::setInitialWidth | ( | $initialWidth | ) |
integer | $initialWidth |
Definition at line 383 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 321 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().