Bug #18510 ยป rtehtmlarea_bugfix_7955.patch
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php (working copy) | ||
---|---|---|
*
|
||
* (c) 2004 Kasper Skaarhoj (kasper@typo3.com)
|
||
* (c) 2004 Philipp Borgmann <philipp.borgmann@gmx.de>
|
||
* (c) 2004-2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
|
||
* (c) 2004-2008 Stanislas Rolland <typo3(arobas)sjbr.ca>
|
||
* All rights reserved
|
||
*
|
||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||
... | ... | |
* A RTE using the htmlArea editor
|
||
*
|
||
* @author Philipp Borgmann <philipp.borgmann@gmx.de>
|
||
* @author Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
|
||
* @author Stanislas Rolland <typo3(arobas)sjbr.ca>
|
||
*
|
||
* $Id$ *
|
||
*/
|
||
... | ... | |
|
||
// External:
|
||
var $RTEdivStyle; // Alternative style for RTE <div> tag.
|
||
public $httpTypo3Path;
|
||
var $extHttpPath; // full Path to this extension for http (so no Server path). It ends with "/"
|
||
var $siteURL; // TYPO3 site url
|
||
var $hostURL; // TYPO3 host url
|
||
... | ... | |
|
||
// Setting the plugin flags
|
||
$configureRTEInJavascriptString .= '
|
||
RTEarea['.$RTEcounter.'].plugin = new Object();';
|
||
RTEarea['.$RTEcounter.'].plugin = new Object();
|
||
RTEarea['.$RTEcounter.'].pathToPluginDirectory = new Object();';
|
||
foreach ($this->pluginEnabledArray as $pluginId) {
|
||
$configureRTEInJavascriptString .= '
|
||
RTEarea['.$RTEcounter.'].plugin.'.$pluginId.' = true;';
|
||
if (is_object($this->registeredPlugins[$pluginId])) {
|
||
$pathToPluginDirectory = $this->registeredPlugins[$pluginId]->getPathToPluginDirectory();
|
||
if ($pathToPluginDirectory) {
|
||
$configureRTEInJavascriptString .= '
|
||
RTEarea['.$RTEcounter.'].pathToPluginDirectory.'.$pluginId.' = "' . $pathToPluginDirectory . '";';
|
||
}
|
||
}
|
||
}
|
||
|
||
// Setting the buttons configuration
|
typo3/sysext/rtehtmlarea/class.tx_rtehtmlareaapi.php (working copy) | ||
---|---|---|
/***************************************************************
|
||
* Copyright notice
|
||
*
|
||
* (c) 2007 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
|
||
* (c) 2007-2008 Stanislas Rolland <typo3(arobas)sjbr.ca>
|
||
* All rights reserved
|
||
*
|
||
* This script is part of the Typo3 project. The Typo3 project is
|
||
... | ... | |
/**
|
||
* API for extending htmlArea RTE
|
||
*
|
||
* @author Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
|
||
* @author Stanislas Rolland <typo3(arobas)sjbr.ca>
|
||
*
|
||
* TYPO3 SVN ID: $Id$
|
||
*
|
||
... | ... | |
protected $pluginName; // The name of the plugin registered by the extension
|
||
protected $relativePathToLocallangFile; // Path to the localization file for this script, relative to the extension dir
|
||
protected $relativePathToSkin; // Path to the skin (css) file that should be added to the RTE skin when the registered plugin is enabled, relative to the extension dir
|
||
protected $relativePathToPluginDirectory; // Path to the directory containing the plugin, relative to the extension dir (should end with slash /)
|
||
protected $htmlAreaRTE; // Reference to the invoking object
|
||
protected $rteExtensionKey; // The extension key of the RTE
|
||
protected $thisConfig; // Reference to RTE PageTSConfig
|
||
... | ... | |
if (in_array($button, $this->toolbar)) {
|
||
if (!is_array( $this->thisConfig['buttons.']) || !is_array( $this->thisConfig['buttons.'][$button.'.'])) {
|
||
$registerRTEinJavascriptString .= '
|
||
RTEarea['.$RTEcounter.']["buttons"]["'. $button .'"] = new Object();';
|
||
RTEarea['.$RTEcounter.'].buttons.'. $button .' = new Object();';
|
||
}
|
||
}
|
||
}
|
||
... | ... | |
}
|
||
/**
|
||
* Returns the path to the plugin directory, if any
|
||
*
|
||
* @return string the full path to the plugin directory
|
||
*/
|
||
public function getPathToPluginDirectory() {
|
||
return ($this->relativePathToPluginDirectory ? $this->htmlAreaRTE->httpTypo3Path . t3lib_extMgm::siteRelPath($this->extensionKey) . $this->relativePathToPluginDirectory : '');
|
||
}
|
||
/**
|
||
* Returns the list of buttons implemented by the plugin
|
||
*
|
||
* @return string the list of buttons implemented by the plugin
|
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (working copy) | ||
---|---|---|
HTMLArea.prototype.popupURL = function(file) {
|
||
var url = "";
|
||
if(file.match(/^plugin:\/\/(.*?)\/(.*)/)) {
|
||
var plugin = RegExp.$1;
|
||
var pluginId = RegExp.$1;
|
||
var popup = RegExp.$2;
|
||
if(!/\.html$/.test(popup)) popup += ".html";
|
||
url = _editor_url + "plugins/" + plugin + "/popups/" + popup;
|
||
if (this.config.pathToPluginDirectory[pluginId]) {
|
||
url = this.config.pathToPluginDirectory[pluginId] + "popups/" + popup;
|
||
} else {
|
||
url = _editor_url + "plugins/" + pluginId + "/popups/" + popup;
|
||
}
|
||
} else {
|
||
url = _typo3_host_url + _editor_url + this.config.popupURL + file;
|
||
}
|
typo3/sysext/rtehtmlarea/pi2/class.tx_rtehtmlarea_pi2.php (working copy) | ||
---|---|---|
/***************************************************************
|
||
* Copyright notice
|
||
*
|
||
* (c) 2005-2008 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
|
||
* (c) 2005-2008 Stanislas Rolland <typo3(arobas)sjbr.ca>
|
||
* All rights reserved
|
||
*
|
||
* This script is part of the TYPO3 project. The TYPO3 project is
|
||
... | ... | |
/**
|
||
* Front end RTE based on htmlArea
|
||
*
|
||
* @author Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
|
||
* @author Stanislas Rolland <typo3(arobas)sjbr.ca>
|
||
*
|
||
* $Id$ *
|
||
*/
|
||
... | ... | |
var $RTEWrapStyle = ''; // Alternative style for RTE wrapper <div> tag.
|
||
var $RTEdivStyle = ''; // Alternative style for RTE <div> tag.
|
||
var $extHttpPath; // full Path to this extension for http (so no Server path). It ends with "/"
|
||
public $httpTypo3Path;
|
||
// For the editor
|
||
var $elementId;
|