63 $this->plugins = array();
64 $this->buttons = array();
77 array_push($this->plugins, $a_plugin_name);
90 array_push($this->buttons, $a_button_name);
103 $key = array_search($a_plugin_name, $this->plugins);
106 unset($this->plugins[$key]);
112 foreach($this->plugins as $plugin)
128 $key = array_search($a_button_name, $this->buttons);
131 unset($this->buttons[$key]);
172 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
196 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
199 while (eregi(
"data\/".CLIENT_ID.
"\/mobs\/mm_([0-9]+)", $a_text, $found))
201 $a_text = str_replace($found[0],
"", $a_text);
202 if (!in_array($found[1],
$mobs))
211 unset(
$mobs[$found[1]]);
218 foreach(
$mobs as $mob)
238 if (!strlen($a_text))
return "";
239 switch ($a_direction)
242 $a_text = preg_replace(
'/src="([^"]*?\/mobs\/mm_([0-9]+)\/.*?)\"/',
'src="il_' . IL_INST_ID .
'_mob_\\2"', $a_text);
245 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
246 $resulttext = $a_text;
247 if(preg_match_all(
'/src="il_([0-9]+)_mob_([0-9]+)"/', $a_text, $matches))
249 foreach ($matches[2] as $idx => $mob)
254 $replace =
"il_" . $matches[1][$idx] .
"_mob_" . $mob;
256 require_once(
'./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
257 $path_to_file =
ilWACSignedPath::signFile(ILIAS_HTTP_PATH .
"/data/" . CLIENT_ID .
"/mobs/mm_" . $mob .
"/" . $mob_obj->getTitle());
258 $resulttext = str_replace(
"src=\"$replace\"",
"src=\"" . $path_to_file .
"\"", $resulttext);
262 $a_text = $resulttext;
277 if (!strlen($a_text))
return array();
278 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
280 $mediaObjects = array();
281 switch ($a_direction)
284 if(preg_match_all(
'/src="([^"]*?\/mobs\/mm_([0-9]+)\/.*?)\"/', $a_text, $matches))
286 foreach ($matches[2] as $idx => $mob)
290 $mediaObjects[] = $mob;
296 if(preg_match_all(
'/src="il_([0-9]+)_mob_([0-9]+)"/', $a_text, $matches))
298 foreach ($matches[2] as $idx => $mob)
302 $mediaObjects[] = $mob;
308 return $mediaObjects;
_getRichTextEditor()
Returns the identifier for the Rich Text Editor.
Rich Text Editor base class.
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 s...
addRTESupport()
Adds support for an RTE in an ILIAS form.
removePlugin($a_plugin_name)
Removes a plugin from the plugin list.
static _getMediaObjects($a_text, $a_direction=0)
Returns all media objects found in the passed string.
static _getRTEClassname()
addPlugin($a_plugin_name)
Adds a plugin to the plugin list.
setInitialWidth($initialWidth)
_cleanupMediaObjectUsage($a_text, $a_usage_type, $a_usage_id)
synchronises appearances of media objects in $a_text with media object usage table
addCustomRTESupport($obj_id, $obj_type, $tags)
Adds custom support for an RTE in an ILIAS form.
const ILIAS_IMG_MANAGER_PLUGIN
removeButton($a_button_name)
Removes a button from the button list.
addButton($a_button_name)
Adds a button to the button list.
addUserTextEditor($editor_selector)
Adds support for an user text editor.
static signFile($path_to_file)