Project

General

Profile

Feature #25091 » rtehtmlarea_feature_17658.patch

Administrator Admin, 2011-02-19 02:25

View differences:

typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php (copie de travail)
<div id="pleasewait' . $textAreaId . '" class="pleasewait" style="display: block;" >' . $LANG->getLL('Please wait') . '</div>
<div id="editorWrap' . $textAreaId . '" class="editorWrap" style="visibility: hidden; width:' . $editorWrapWidth . '; height:' . $editorWrapHeight . ';">
<textarea id="RTEarea' . $textAreaId . '" name="'.htmlspecialchars($PA['itemFormElName']).'" rows="0" cols="0" style="'.t3lib_div::deHSCentities(htmlspecialchars($this->RTEdivStyle)).'">'.t3lib_div::formatForTextarea($value).'</textarea>
</div>' . ($TYPO3_CONF_VARS['EXTCONF'][$this->ID]['enableDebugMode'] ? '<div id="HTMLAreaLog"></div>' : '') . '
';
</div>' . LF;
}
// Return form item:
......
RTEarea[0].editorSkin = "' . dirname($this->editorCSS) . '/";
RTEarea[0].editedContentCSS = "' . t3lib_div::createVersionNumberedFilename($this->editedContentCSS) . '";
RTEarea[0].hostUrl = "' . $this->hostURL . '";
RTEarea[0].enableDebugMode = ' . ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableDebugMode'] ? 'true' : 'false') . ';
RTEarea.init = function() {
if (typeof(HTMLArea) == "undefined" || !Ext.isReady) {
window.setTimeout("RTEarea.init();", 40);
typo3/sysext/rtehtmlarea/ext_conf_template.txt (copie de travail)
# cat=basic/enable/170; type=boolean; label=Force Aspell command mode: If set, the spellchecker will use the Aspell command interface. Presumably. PHP is compiled with pspell, but with an old version of Aspell. If set, PHP safe mode should NOT be enabled.
forceCommandMode = 0
# cat=basic/enable/190; type=boolean; label=Enable troubleshooting mode: If set, a troubleshooting log will be displayed below the editing area.
enableDebugMode = 0
# cat=basic/enable/180; type=boolean; label=Enable compressed scripts: If set, the compressed version of the editor scripts will be used.
enableCompressedScripts = 1
typo3/sysext/rtehtmlarea/ext_localconf.php (copie de travail)
// Add Status Report about Conflicting Extensions
require_once(t3lib_extMgm::extPath('rtehtmlarea') . 'hooks/statusreport/ext_localconf.php');
// Troubleshooting and script compression
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableDebugMode'] = isset($_EXTCONF['enableDebugMode']) ? $_EXTCONF['enableDebugMode'] : 0;
// Script compression
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableCompressedScripts'] = (isset($_EXTCONF['enableCompressedScripts']) && !$_EXTCONF['enableCompressedScripts']) ? 0 : 1;
// Disable script compression when in troubleshooting mode
if ($TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableDebugMode']) {
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['enableCompressedScripts'] = 0;
}
// Configure Lorem Ipsum hook to insert nonsense in wysiwyg mode
if (t3lib_extMgm::isLoaded('lorem_ipsum') && (TYPO3_MODE == 'BE')) {
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail)
RE_noClosingTag : /^(img|br|hr|col|input|area|base|link|meta|param)$/i,
RE_numberOrPunctuation : /[0-9.(),;:!¡?¿%#$'"_+=\\\/-]*/g,
/***************************************************
* TROUBLESHOOTING *
***************************************************/
_appendToLog: function(str){
if (HTMLArea.enableDebugMode) {
var log = document.getElementById('HTMLAreaLog');
if(log) {
log.appendChild(document.createTextNode(str));
log.appendChild(document.createElement('br'));
}
}
},
appendToLog: function (editorId, objectName, functionName, text) {
HTMLArea._appendToLog(editorId + '[' + objectName + '::' + functionName + ']: ' + text);
},
/***************************************************
* LOCALIZATION *
***************************************************/
localize: function (label) {
......
HTMLArea.editedContentCSS = HTMLArea.editorSkin + 'htmlarea-edited-content.css';
}
HTMLArea.isReady = true;
HTMLArea._appendToLog("[HTMLArea::init]: Editor url set to: " + HTMLArea.editorUrl);
HTMLArea._appendToLog("[HTMLArea::init]: Editor skin CSS set to: " + HTMLArea.editorCSS);
HTMLArea._appendToLog("[HTMLArea::init]: Editor content skin CSS set to: " + HTMLArea.editedContentCSS);
HTMLArea.appendToLog('', 'HTMLArea', 'init', 'Editor url set to: ' + HTMLArea.editorUrl, 'info');
HTMLArea.appendToLog('', 'HTMLArea', 'init', 'Editor skin CSS set to: ' + HTMLArea.editorCSS, 'info');
HTMLArea.appendToLog('', 'HTMLArea', 'init', 'Editor content skin CSS set to: ' + HTMLArea.editedContentCSS, 'info');
},
/*
* Write message to JavaScript console
*
* @param string editorId: the id of the editor issuing the message
* @param string objectName: the name of the object issuing the message
* @param string functionName: the name of the function issuing the message
* @param string text: the text of the message
* @param string type: the type of message: 'log', 'info', 'warn' or 'error'
*
* @return void
*/
appendToLog: function (editorId, objectName, functionName, text, type) {
var str = 'RTE[' + editorId + '][' + objectName + '::' + functionName + ']: ' + text;
if (typeof(type) === 'undefined') {
var type = 'info';
}
if (typeof(console) !== 'undefined' && typeof(console) === 'object') {
// If console is TYPO3.Backend.DebugConsole, write only error messages
if (Ext.isFunction(console.addTab)) {
if (type === 'error') {
console[type](str);
}
} else {
console[type](str);
}
}
}
});
/***************************************************
......
this.editedContentStyle = HTMLArea.editedContentCSS;
// content style
this.pageStyle = "";
// Maximum attempts at accessing the stylesheets
this.styleSheetsMaximumAttempts = 20;
// Remove tags (must be a regular expression)
this.htmlRemoveTags = /none/i;
// Remove tags and their contents (must be a regular expression)
......
registerButton: function (config) {
config.itemId = config.id;
if (Ext.type(this.buttonsConfig[config.id])) {
HTMLArea._appendToLog('[HTMLArea.Config::registerButton]: A toolbar item with the same Id: ' + config.id + ' already exists and will be overidden.');
HTMLArea.appendToLog('', 'HTMLArea.Config', 'registerButton', 'A toolbar item with the same Id: ' + config.id + ' already exists and will be overidden.', 'warn');
}
// Apply defaults
config = Ext.applyIf(config, this.configDefaults['all']);
......
*/
registerHotKey: function (hotKeyConfiguration) {
if (Ext.isDefined(this.hotKeyList[hotKeyConfiguration.id])) {
HTMLArea._appendToLog('[HTMLArea.Config::registerHotKey]: A hotkey with the same key ' + hotKeyConfiguration.id + ' already exists and will be overidden.');
HTMLArea.appendToLog('', 'HTMLArea.Config', 'registerHotKey', 'A hotkey with the same key ' + hotKeyConfiguration.id + ' already exists and will be overidden.', 'warn');
}
if (Ext.isDefined(hotKeyConfiguration.cmd) && !Ext.isEmpty(hotKeyConfiguration.cmd) && Ext.isDefined(this.buttonsConfig[hotKeyConfiguration.cmd])) {
this.hotKeyList[hotKeyConfiguration.id] = hotKeyConfiguration;
HTMLArea._appendToLog('[HTMLArea.Config::registerHotKey]: A hotkey with key ' + hotKeyConfiguration.id + ' was registered for toolbar item ' + hotKeyConfiguration.cmd + '.');
return true;
} else {
HTMLArea._appendToLog('[HTMLArea.Config::registerHotKey]: A hotkey with key ' + hotKeyConfiguration.id + ' could not be registered because toolbar item with id ' + hotKeyConfiguration.cmd + ' was not registered.');
HTMLArea.appendToLog('', 'HTMLArea.Config', 'registerHotKey', 'A hotkey with key ' + hotKeyConfiguration.id + ' could not be registered because toolbar item with id ' + hotKeyConfiguration.cmd + ' was not registered.', 'warn');
return false;
}
},
......
base.href = this.config.baseURL;
head.appendChild(base);
}
HTMLArea._appendToLog('[HTMLArea.Iframe::createHead]: Iframe baseURL set to: ' + base.href);
this.getEditor().appendToLog('HTMLArea.Iframe', 'createHead', 'Iframe baseURL set to: ' + base.href, 'info');
}
var link0 = this.document.getElementsByTagName('link')[0];
if (!link0) {
......
// Therefore, for versions before 3.6.8, we prepend the url with the base, if the url is not absolute
link0.href = ((Ext.isGecko && navigator.productSub < 2010072200 && !/^http(s?):\/{2}/.test(this.config.editedContentStyle)) ? this.config.baseURL : '') + this.config.editedContentStyle;
head.appendChild(link0);
HTMLArea._appendToLog('[HTMLArea.Iframe::createHead]: Skin CSS set to: ' + link0.href);
this.getEditor().appendToLog('HTMLArea.Iframe', 'createHead', 'Skin CSS set to: ' + link0.href, 'info');
}
if (this.config.defaultPageStyle) {
var link = this.document.getElementsByTagName('link')[1];
......
link.href = ((Ext.isGecko && navigator.productSub < 2010072200 && !/^https?:\/{2}/.test(this.config.defaultPageStyle)) ? this.config.baseURL : '') + this.config.defaultPageStyle;
head.appendChild(link);
}
HTMLArea._appendToLog('[HTMLArea.Iframe::createHead]: Override CSS set to: ' + link.href);
this.getEditor().appendToLog('HTMLArea.Iframe', 'createHead', 'Override CSS set to: ' + link.href, 'info');
}
if (this.config.pageStyle) {
var link = this.document.getElementsByTagName('link')[2];
......
link.href = ((Ext.isGecko && navigator.productSub < 2010072200 && !/^https?:\/{2}/.test(this.config.pageStyle)) ? this.config.baseURL : '') + this.config.pageStyle;
head.appendChild(link);
}
HTMLArea._appendToLog('[HTMLArea.Iframe::createHead]: Content CSS set to: ' + link.href);
this.getEditor().appendToLog('HTMLArea.Iframe', 'createHead', 'Content CSS set to: ' + link.href, 'info');
}
HTMLArea._appendToLog('[HTMLArea.Iframe::createHead]: Editor iframe document head successfully built.');
},
/*
* Fire event 'HTMLAreaEventIframeReady' when the iframe style sheets become accessible
*
* @param int count: number of attempts at accessing the stylesheets
*
* @return void
*/
getStyleSheets: function () {
getStyleSheets: function (count) {
if (typeof(count) === 'undefined') {
var count = 0;
}
var stylesAreLoaded = true;
var errorText = '';
var rules;
......
}
}
if (!stylesAreLoaded) {
this.getStyleSheets.defer(100, this);
HTMLArea._appendToLog('[HTMLArea.Iframe::getStyleSheets]: Stylesheets not yet loaded (' + errorText + '). Retrying...');
if (/Security/i.test(errorText)) {
HTMLArea._appendToLog('ERROR [HTMLArea.Iframe::getStyleSheets]: A security error occurred. Make sure all stylesheets are accessed from the same domain/subdomain and using the same protocol as the current script.');
this.getEditor().appendToLog('HTMLArea.Iframe', 'getStyleSheets', 'A security error occurred. Make sure all stylesheets are accessed from the same domain/subdomain and using the same protocol as the current script.', 'error');
} else if (count > this.config.styleSheetsMaximumAttempts) {
this.getEditor().appendToLog('HTMLArea.Iframe', 'getStyleSheets', 'Stylesheets not loaded after ' + count + ' attempts. (' + errorText + ').', 'error');
} else {
this.getStyleSheets.defer(100, this, [count++]);
}
} else {
HTMLArea._appendToLog('[HTMLArea.Iframe::getStyleSheets]: Stylesheets successfully accessed.');
// Style the document body
Ext.get(this.document.body).addClass('htmlarea-content-body');
// Start listening to things happening in the iframe
......
}, this);
this.ready = true;
this.fireEvent('HTMLAreaEventEditorReady');
HTMLArea._appendToLog('[HTMLArea.Editor::onFrameworkReady]: Editor ready.');
this.appendToLog('HTMLArea.Editor', 'onFrameworkReady', 'Editor ready.', 'info');
},
/*
* Set editor mode
......
try {
this.document.body.innerHTML = this.getHTML();
} catch(e) {
HTMLArea._appendToLog('[HTMLArea.Editor::setMode]: The HTML document is not well-formed.');
this.appendToLog('HTMLArea.Editor', 'setMode', 'The HTML document is not well-formed.', 'warn');
TYPO3.Dialog.ErrorDialog({
title: 'htmlArea RTE',
msg: HTMLArea.I18N.msg['HTML-document-not-well-formed']
......
registerPlugin: function (pluginName) {
var plugin = HTMLArea[pluginName],
isRegistered = false;
if (Ext.isFunction(plugin)) {
if (typeof(plugin) !== 'undefined' && Ext.isFunction(plugin)) {
var pluginInstance = new plugin(this, pluginName);
if (pluginInstance) {
var pluginInformation = pluginInstance.getPluginInformation();
......
isRegistered = true;
}
}
if (isRegistered) {
HTMLArea._appendToLog('[HTMLArea.Editor::registerPlugin]: Plugin ' + pluginName + ' was successfully registered.');
} else {
HTMLArea._appendToLog('ERROR [HTMLArea.Editor::registerPlugin]: Could not register plugin ' + pluginName + '.');
if (!isRegistered) {
this.appendToLog('HTMLArea.Editor', 'registerPlugin', 'Could not register plugin ' + pluginName + '.', 'warn');
}
return isRegistered;
},
......
var plugin = this.getPlugin(pluginId);
plugin.onGenerate();
}, this);
HTMLArea._appendToLog('[HTMLArea.Editor::generatePlugins]: All plugins successfully generated.');
},
/*
* Get the instance of the specified plugin, if it exists
......
*
* @param string functionName: the name of the editor function writing to the log
* @param string text: the text of the message
* @param string type: the type of message
*
* @return void
*/
appendToLog: function (objectName, functionName, text) {
HTMLArea.appendToLog(this.editorId, objectName, functionName, text);
appendToLog: function (objectName, functionName, text, type) {
HTMLArea.appendToLog(this.editorId, objectName, functionName, text, type);
},
/*
* Iframe unload handler: Update the textarea for submission and cleanup
......
getJavascriptFile: function (url, callback, scope) {
var success = false;
var self = this;
this.editor.appendToLog('HTMLArea.Ajax', 'getJavascriptFile', 'Requesting script ' + url);
Ext.Ajax.request({
method: 'GET',
url: url,
......
},
failure: function (response) {
self.editor.inhibitKeyboardInput = false;
self.editor.appendToLog('HTMLArea.Ajax', 'getJavascriptFile', 'Unable to get ' + url + ' . Server reported ' + response.status);
self.editor.appendToLog('HTMLArea.Ajax', 'getJavascriptFile', 'Unable to get ' + url + ' . Server reported ' + response.status, 'error');
},
scope: scope
});
......
params += (params.length ? '&' : '') + parameter + '=' + encodeURIComponent(value);
});
params += this.editor.config.RTEtsConfigParams;
this.editor.appendToLog('HTMLArea.Ajax', 'postData', 'Posting to ' + url + '. Data: ' + params);
Ext.Ajax.request({
method: 'POST',
headers: {
......
url: url,
params: params,
callback: Ext.isFunction(callback) ? callback: function (options, success, response) {
if (success) {
self.editor.appendToLog('HTMLArea.Ajax', 'postData', 'Post request to ' + url + ' successful. Server response: ' + response.responseText);
} else {
self.editor.appendToLog('HTMLArea.Ajax', 'postData', 'Post request to ' + url + ' failed. Server reported ' + response.status);
if (!success) {
self.editor.appendToLog('HTMLArea.Ajax', 'postData', 'Post request to ' + url + ' failed. Server reported ' + response.status, 'error');
}
},
success: function (response) {
success = true;
},
failure: function (response) {
self.editor.appendToLog('HTMLArea.Ajax', 'postData', 'Unable to post ' + url + ' . Server reported ' + response.status);
self.editor.appendToLog('HTMLArea.Ajax', 'postData', 'Unable to post ' + url + ' . Server reported ' + response.status, 'error');
},
scope: scope
});
......
try {
this.document.execCommand(cmdID, UI, param);
} catch(e) {
HTMLArea._appendToLog('[HTMLArea.Editor::execCommand]: ' + e + 'by execCommand(' + cmdID + ')');
this.appendToLog('HTMLArea.Editor', 'execCommand', e + ' by execCommand(' + cmdID + ')', 'error');
}
}
this.toolbar.update();
......
try {
return editor.iframe.htmlRenderer.render(root, outputRoot);
} catch(e) {
HTMLArea._appendToLog('[HTMLArea::getHTML]: The HTML document is not well-formed.');
if (!HTMLArea.enableDebugMode) {
TYPO3.Dialog.ErrorDialog({
title: 'htmlArea RTE',
msg: HTMLArea.I18N.msg['HTML-document-not-well-formed']
});
return editor.document.body.innerHTML;
} else {
return editor.iframe.htmlRenderer.render(root, outputRoot);
}
editor.appendToLog('HTMLArea', 'getHTML', 'The HTML document is not well-formed.', 'warn');
TYPO3.Dialog.ErrorDialog({
title: 'htmlArea RTE',
msg: HTMLArea.I18N.msg['HTML-document-not-well-formed']
});
return editor.document.body.innerHTML;
}
};
HTMLArea.getPrevNode = function(node) {
......
try {
if (typeof(HTMLArea.classesLabels) === 'undefined') {
eval(response.responseText);
this.editor.appendToLog('HTMLArea.CSS.Parser', 'initiateParsing', 'Javascript file successfully evaluated: ' + this.editor.config.classesUrl);
}
} catch(e) {
this.editor.appendToLog('HTMLArea.CSS.Parser', 'initiateParsing', 'Error evaluating contents of Javascript file: ' + this.editor.config.classesUrl);
this.editor.appendToLog('HTMLArea.CSS.Parser', 'initiateParsing', 'Error evaluating contents of Javascript file: ' + this.editor.config.classesUrl, 'error');
}
}
this.parse();
......
this.attemptTimeout = this.parse.defer(200, this);
this.parseAttemptsCounter++;
} else {
this.editor.appendToLog('HTMLArea.CSS.Parser', 'parse', 'The stylesheets could not be parsed. Reported error: ' + this.error);
this.editor.appendToLog('HTMLArea.CSS.Parser', 'parse', 'The stylesheets could not be parsed. Reported error: ' + this.error, 'error');
this.fireEvent('HTMLAreaEventCssParsingComplete');
}
} else {
......
HTMLArea.initEditor.defer(150, null, [editorNumber]);
} else {
// Create an editor for the textarea
HTMLArea._appendToLog("[HTMLArea::initEditor]: Initializing editor with editor Id: " + editorNumber + ".");
var editor = new HTMLArea.Editor(Ext.apply(new HTMLArea.Config(editorNumber), RTEarea[editorNumber]));
editor.generate();
return false;
......
* Note: this.base will exclusively refer to the HTMLArea.Plugin class constructor
*/
base: function (editor, pluginName) {
HTMLArea.appendToLog(editor.editorId, 'HTMLArea.' + pluginName, 'base', 'Deprecated use of base function. Use Ext superclass reference instead.');
HTMLArea.appendToLog(editor.editorId, 'HTMLArea.' + pluginName, 'base', 'Deprecated use of base function. Use Ext superclass reference instead.', 'warn');
HTMLArea.Plugin.prototype.constructor.call(this, editor, pluginName);
},
/**
......
* @return boolean true if the information was registered
*/
registerPluginInformation: function(pluginInformation) {
if (typeof(pluginInformation) !== "object") {
this.appendToLog("registerPluginInformation", "Plugin information was not provided");
if (typeof(pluginInformation) !== 'object') {
this.appendToLog('registerPluginInformation', 'Plugin information was not provided', 'warn');
return false;
} else {
this.pluginInformation = pluginInformation;
......
return true;
}
} else {
this.appendToLog("registerButton", "Function " + buttonConfiguration.action + " was not defined when registering button " + buttonConfiguration.id);
this.appendToLog('registerButton', 'Function ' + buttonConfiguration.action + ' was not defined when registering button ' + buttonConfiguration.id, 'error');
}
}
return false;
......
}
return this.editorConfiguration.registerButton(dropDownConfiguration);
} else {
this.appendToLog('registerDropDown', 'Function ' + dropDownConfiguration.action + ' was not defined when registering drop-down ' + dropDownConfiguration.id);
this.appendToLog('registerDropDown', 'Function ' + dropDownConfiguration.action + ' was not defined when registering drop-down ' + dropDownConfiguration.id, 'error');
}
}
return false;
......
* @return boolean true on success of the request submission
*/
getJavascriptFile: function (url, callback) {
this.appendToLog('getJavascriptFile', 'Requesting script ' + url);
return this.editor.ajax.getJavascriptFile(url, callback, this);
},
/**
......
* @return boolean true on success
*/
postData: function (url, data, callback) {
this.appendToLog('postData', 'Posting to ' + url + '.');
return this.editor.ajax.postData(url, data, callback, this);
},
/*
......
*
* @param string functionName: the name of the plugin function writing to the log
* @param string text: the text of the message
* @param string type: the typeof of message: 'log', 'info', 'warn' or 'error'
*
* @return void
*/
appendToLog: function (functionName, text) {
this.editor.appendToLog(this.name, functionName, text);
appendToLog: function (functionName, text, type) {
this.editor.appendToLog(this.name, functionName, text, type);
},
/*
* Add a config element to config array if not empty
typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js (copie de travail)
try {
this.editor._doc.execCommand(buttonId, false, element);
} catch(e) {
this.appendToLog("applyBlockElement", e + "\n\nby execCommand(" + buttonId + ");");
this.appendToLog('applyBlockElement', e + '\n\nby execCommand(' + buttonId + ');', 'error');
}
this.addClassOnBlockElements(tagName, className);
}
......
try {
this.editor._doc.execCommand(buttonId, false, null);
} catch(e) {
this.appendToLog("onButtonPress", e + "\n\nby execCommand(" + buttonId + ");");
this.appendToLog('onButtonPress', e + '\n\nby execCommand(' + buttonId + ');', 'error');
}
this.indentedList = parentElement;
this.makeNestedList(parentElement);
......
try {
this.editor._doc.execCommand(buttonId, false, null);
} catch(e) {
this.appendToLog("onButtonPress", e + "\n\nby execCommand(" + buttonId + ");");
this.appendToLog('onButtonPress', e + '\n\nby execCommand(' + buttonId + ');', 'error');
}
} else if (this.isAllowedBlockElement("div")) {
if (/^div$/i.test(parentElement.nodeName) && !HTMLArea.DOM.hasClass(parentElement, this.useClass[buttonId])) {
......
try {
this.editor._doc.execCommand(buttonId, false, null);
} catch(e) {
this.appendToLog("onButtonPress", e + "\n\nby execCommand(" + buttonId + ");");
this.appendToLog('onButtonPress', e + '\n\nby execCommand(' + buttonId + ');', 'error');
}
} else {
this.outdentSelectedListElements(parentElement, range);
......
try {
this.editor._doc.execCommand(buttonId, false, null);
} catch(e) {
this.appendToLog("onButtonPress", e + "\n\nby execCommand(" + buttonId + ");");
this.appendToLog('onButtonPress', e + '\n\nby execCommand(' + buttonId + ');', 'error');
}
} else if (this.isAllowedBlockElement("div")) {
for (var i = blockAncestors.length; --i >= 0;) {
......
try {
this.editor._doc.execCommand(buttonId, false, null);
} catch(e) {
this.appendToLog("onButtonPress", e + "\n\nby execCommand(" + buttonId + ");");
this.appendToLog('onButtonPress', e + '\n\nby execCommand(' + buttonId + ');', 'error');
}
} else {
this.addClassOnBlockElements(buttonId);
......
try {
this.editor._doc.execCommand(buttonId, false, null);
} catch(e) {
this.appendToLog("onButtonPress", e + "\n\nby execCommand(" + buttonId + ");");
this.appendToLog('onButtonPress', e + '\n\nby execCommand(' + buttonId + ');', 'error');
}
if (Ext.isWebKit) {
this.editor.cleanAppleStyleSpans(parentNode);
typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/copy-paste.js (copie de travail)
}
});
if (!InstallTrigger) {
this.appendToLog('mozillaClipboardAccessException', 'Firefox InstallTrigger was not defined.');
this.appendToLog('mozillaClipboardAccessException', 'Firefox InstallTrigger was not defined.', 'warn');
}
}
},
......
title: self.localize('Allow-Clipboard-Helper-Add-On-Title'),
msg: self.localize('Moz-Extension-Failure')
});
self.appendToLog('installAllowClipboardHelperExtension', 'Mozilla install return code was: ' + returnCode + '.');
self.appendToLog('installAllowClipboardHelperExtension', 'Mozilla install return code was: ' + returnCode + '.', 'warn');
}
return false;
}
......
title: this.localize('Allow-Clipboard-Helper-Add-On-Title'),
msg: this.localize('Mozilla-Org-Install-Not-Enabled')
});
this.appendToLog('installAllowClipboardHelperExtension', 'Mozilla install was not enabled.');
this.appendToLog('installAllowClipboardHelperExtension', 'Mozilla install was not enabled.', 'warn');
}
}
}
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultInline/default-inline.js (copie de travail)
editor._doc.execCommand(buttonId, false, null);
}
catch(e) {
this.appendToLog("onButtonPress", e + "\n\nby execCommand(" + buttonId + ");");
this.appendToLog('onButtonPress', e + '\n\nby execCommand(' + buttonId + ');', 'error');
}
return false;
},
typo3/sysext/rtehtmlarea/htmlarea/plugins/InlineElements/inline-elements.js (copie de travail)
this.applyInlineElement(editor, element);
return false;
} else {
this.appendToLog("onButtonPress", "No element corresponding to button: " + buttonId);
this.appendToLog('onButtonPress', 'No element corresponding to button: ' + buttonId, 'warn');
}
},
typo3/sysext/rtehtmlarea/htmlarea/plugins/Language/language.js (copie de travail)
try {
styleSheet.insertRule(rule, styleSheet.cssRules.length);
} catch (e) {
this.appendToLog("onGenerate", "Error inserting css rule: " + rule + " Error text: " + e);
this.appendToLog('onGenerate', 'Error inserting css rule: ' + rule + ' Error text: ' + e, 'warn');
}
} else {
styleSheet.addRule(selector, style);
typo3/sysext/rtehtmlarea/htmlarea/plugins/TableOperations/table-operations.js (copie de travail)
try {
if (typeof(HTMLArea.classesAlternating) === 'undefined' || typeof(HTMLArea.classesCounting) === 'undefined') {
eval(response.responseText);
this.appendToLog('reStyleTable', 'Javascript file successfully evaluated: ' + this.classesUrl);
}
this.reStyleTable(table);
} catch(e) {
this.appendToLog('reStyleTable', 'Error evaluating contents of Javascript file: ' + this.classesUrl);
this.appendToLog('reStyleTable', 'Error evaluating contents of Javascript file: ' + this.classesUrl, 'error');
}
}
});
......
try {
if (typeof(HTMLArea.classesAlternating) === 'undefined') {
eval(response.responseText);
this.appendToLog('removeAlternatingClasses', 'Javascript file successfully evaluated: ' + this.classesUrl);
}
this.removeAlternatingClasses(table, removeClass);
} catch(e) {
this.appendToLog('removeAlternatingClasses', 'Error evaluating contents of Javascript file: ' + this.classesUrl);
this.appendToLog('removeAlternatingClasses', 'Error evaluating contents of Javascript file: ' + this.classesUrl, 'error');
}
}
});
......
try {
if (typeof(HTMLArea.classesCounting) === 'undefined') {
eval(response.responseText);
this.appendToLog('removeCountingClasses', 'Javascript file successfully evaluated: ' + this.classesUrl);
}
this.removeCountingClasses(table, removeClass);
} catch(e) {
this.appendToLog('removeCountingClasses', 'Error evaluating contents of Javascript file: ' + this.classesUrl);
this.appendToLog('removeCountingClasses', 'Error evaluating contents of Javascript file: ' + this.classesUrl, 'error');
}
}
});
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/typo3html-parser.js (copie de travail)
if (success) {
editor.setHTML(response.responseText);
editor.selectRange(editor.moveToBookmark(bookmark));
this.appendToLog('clean', 'Post request to ' + url + ' successful. Server response: ' + response.responseText);
} else {
this.appendToLog('clean', 'Post request to ' + url + ' failed. Server reported ' + response.status);
this.appendToLog('clean', 'Post request to ' + url + ' failed. Server reported ' + response.status, 'error');
}
this.editor.inhibitKeyboardInput = false;
}
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3Link/typo3link.js (copie de travail)
try {
if (typeof(HTMLArea.classesAnchorSetup) === 'undefined') {
eval(response.responseText);
this.appendToLog('ongenerate', 'Javascript file successfully evaluated: ' + this.classesAnchorUrl);
}
} catch(e) {
this.appendToLog('ongenerate', 'Error evaluating contents of Javascript file: ' + this.classesAnchorUrl);
this.appendToLog('ongenerate', 'Error evaluating contents of Javascript file: ' + this.classesAnchorUrl, 'error');
}
}
});
......
try {
if (typeof(HTMLArea.classesAnchorSetup) === 'undefined') {
eval(response.responseText);
this.appendToLog('onButtonPress', 'Javascript file successfully evaluated: ' + this.classesAnchorUrl);
}
this.onButtonPress(editor, id, target);
} catch(e) {
this.appendToLog('onButtonPress', 'Error evaluating contents of Javascript file: ' + this.classesAnchorUrl);
this.appendToLog('onButtonPress', 'Error evaluating contents of Javascript file: ' + this.classesAnchorUrl, 'error');
}
}
});
typo3/sysext/rtehtmlarea/pi2/class.tx_rtehtmlarea_pi2.php (copie de travail)
<div id="pleasewait' . $textAreaId . '" class="pleasewait" style="display: block;" >' . $TSFE->csConvObj->conv($TSFE->getLLL('Please wait',$this->LOCAL_LANG), $this->charset, $TSFE->renderCharset) . '</div>
<div id="editorWrap' . $textAreaId . '" class="editorWrap" style="visibility: hidden; '. htmlspecialchars($this->RTEWrapStyle). '">
<textarea id="RTEarea' . $textAreaId . '" name="'.htmlspecialchars($PA['itemFormElName']).'" rows="0" cols="0" style="'.htmlspecialchars($this->RTEdivStyle).'">'.t3lib_div::formatForTextarea($value).'</textarea>
</div>' . ($TYPO3_CONF_VARS['EXTCONF'][$this->ID]['enableDebugMode'] ? '<div id="HTMLAreaLog"></div>' : '') . '
';
</div>' . LF;
return $item;
}
/**
    (1-1/1)