57 $this->plugins = array();
58 $this->buttons = array();
71 array_push($this->plugins, $a_plugin_name);
84 array_push($this->buttons, $a_button_name);
97 $key = array_search($a_plugin_name, $this->plugins);
100 unset($this->plugins[$key]);
106 foreach($this->plugins as $plugin)
122 $key = array_search($a_button_name, $this->buttons);
125 unset($this->buttons[$key]);
166 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
190 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
193 while (eregi(
"data\/".CLIENT_ID.
"\/mobs\/mm_([0-9]+)", $a_text, $found))
195 $a_text = str_replace($found[0],
"", $a_text);
196 if (!in_array($found[1],
$mobs))
205 unset(
$mobs[$found[1]]);
212 foreach(
$mobs as $mob)
232 if (!strlen($a_text))
return "";
233 switch ($a_direction)
236 $a_text = preg_replace(
"/src\=\"(.*?\/mobs\/mm_([0-9]+)\/.*?)\"/",
"src=\"il_" . IL_INST_ID .
"_mob_" .
"\\2" .
"\"", $a_text);
239 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
240 $resulttext = $a_text;
241 if (preg_match_all(
"/src\=\"il_([0-9]+)_mob_([0-9]+)\"/", $a_text, $matches))
243 foreach ($matches[2] as $idx => $mob)
248 $replace =
"il_" . $matches[1][$idx] .
"_mob_" . $mob;
249 $resulttext = str_replace(
"src=\"$replace\"",
"src=\"" . ILIAS_HTTP_PATH .
"/data/" . CLIENT_ID .
"/mobs/mm_" . $mob .
"/" . $mob_obj->getTitle() .
"\"", $resulttext);
253 $a_text = $resulttext;
268 if (!strlen($a_text))
return array();
269 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
271 $mediaObjects = array();
272 switch ($a_direction)
275 if(preg_match_all(
"/src\=\"(.*?\/mobs\/mm_([0-9]+)\/.*?)\"/", $a_text, $matches))
277 foreach ($matches[2] as $idx => $mob)
281 $mediaObjects[] = $mob;
288 if(preg_match_all(
"/src\=\"il_([0-9]+)_mob_([0-9]+)\"/", $a_text, $matches))
290 foreach ($matches[2] as $idx => $mob)
294 $mediaObjects[] = $mob;
300 return $mediaObjects;
static _getMediaObjects($a_text, $a_direction=0)
Returns all media objects found in the passed string.
static _getRTEClassname()
addRTESupport()
Adds support for an RTE in an ILIAS form.
addButton($a_button_name)
Adds a button to the button list.
_getRichTextEditor()
Returns the identifier for the Rich Text Editor.
_cleanupMediaObjectUsage($a_text, $a_usage_type, $a_usage_id)
synchronises appearances of media objects in $a_text with media object usage table ...
removeButton($a_button_name)
Removes a button from the button list.
addUserTextEditor($editor_selector)
Adds support for an user text editor.
Rich Text Editor base class.
const ILIAS_IMG_MANAGER_PLUGIN
addCustomRTESupport($obj_id, $obj_type, $tags)
Adds custom support for an RTE in an ILIAS form.
static _replaceMediaObjectImageSrc($a_text, $a_direction=0)
replaces image source from mob image urls with the mob id or replaces mob id with the correct image s...
addPlugin($a_plugin_name)
Adds a plugin to the plugin list.
removePlugin($a_plugin_name)
Removes a plugin from the plugin list.