english/libraries/joomla/html/editor.php
/**
	 * Load the editor
	 *
	 * @param   array  $config  Associative array of editor config paramaters
	 *
	 * @return  mixed
	 * @since   11.1
	 */
Load the editor
@param   array  $config  Associative array of editor config paramaters


Load the editor @param array $config Associative array of editor config paramaters
protected function _loadEditor($config = array())
	{
		if (!is_null(($this->_editor))) {
			return;
		}
		jimport('joomla.filesystem.file');
		$name = JFilterInput::getInstance()->clean($this->_name, 'cmd');
		$path = JPATH_PLUGINS.'/editors/'.$name.'.php';
		if (!JFile::exists($path)) {
			$path = JPATH_PLUGINS.'/editors/'.$name.'/'.$name.'.php';
			if (!JFile::exists($path)) {
				$message = JText::_('JLIB_HTML_EDITOR_CANNOT_LOAD');
				JError::raiseWarning(500, $message);
				return false;
			}
		}
		require_once $path;
		$plugin		= JPluginHelper::getPlugin('editors', $this->_name);
		$params = new JRegistry;
		$params->loadString($plugin->params);
		$params->loadArray($config);
		$plugin->params = $params;
		$name = 'plgEditor'.$this->_name;
		if ($this->_editor = new $name ($this, (array)$plugin)) {
			$this->initialise();
			JPluginHelper::importPlugin('editors-xtd');
		}
	}
protected function _loadEditor ( $ config = array ( ) ) { if ( ! is_null ( ( $ this -> _editor ) ) ) { return ; } jimport ( 'joomla.filesystem.file' ) ; $ name = JFilterInput :: getInstance ( ) -> clean ( $ this -> _name , 'cmd' ) ; $ path = JPATH_PLUGINS . '/editors/' . $ name . '.php' ; if ( ! JFile :: exists ( $ path ) ) { $ path = JPATH_PLUGINS . '/editors/' . $ name . '/' . $ name . '.php' ; if ( ! JFile :: exists ( $ path ) ) { $ message = JText :: _ ( 'JLIB_HTML_EDITOR_CANNOT_LOAD' ) ; JError :: raiseWarning ( 500 , $ message ) ; return false ; } } require_once $ path ; $ plugin = JPluginHelper :: getPlugin ( 'editors' , $ this -> _name ) ; $ params = new JRegistry ; $ params -> loadString ( $ plugin -> params ) ; $ params -> loadArray ( $ config ) ; $ plugin -> params = $ params ; $ name = 'plgEditor' . $ this -> _name ; if ( $ this -> _editor = new $ name ( $ this , ( array ) $ plugin ) ) { $ this -> initialise ( ) ; JPluginHelper :: importPlugin ( 'editors-xtd' ) ; } }
Load the editor
 @param   array  $config  Associative array of editor config paramaters
Load the editor @param array $config Associative array of editor config paramaters
// Check whether editor is already loaded // Build the path to the needed editor plugin // Require plugin file // Get the plugin // Build editor plugin classname // Load plugin parameters