Bug #21536 » rtehtmlarea_bugfix_12568_trunk.patch
typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js (copie de travail) | ||
---|---|---|
this.selectNodeContents(element, false);
|
||
};
|
||
/*
|
||
* Clean Apple wrapping span and font tags under the specified node
|
||
*
|
||
* @param object node: the node in the subtree of which cleaning is performed
|
||
*
|
||
* @return void
|
||
*/
|
||
HTMLArea.prototype.cleanAppleStyleSpans = function(node) {
|
||
if (HTMLArea.is_safari) {
|
||
if (node.getElementsByClassName) {
|
||
var spans = node.getElementsByClassName("Apple-style-span");
|
||
for (var i = spans.length; --i >= 0;) {
|
||
this.removeMarkup(spans[i]);
|
||
}
|
||
} else {
|
||
var spans = node.getElementsByTagName("span");
|
||
for (var i = spans.length; --i >= 0;) {
|
||
if (HTMLArea._hasClass(spans[i], "Apple-style-span")) {
|
||
this.removeMarkup(spans[i]);
|
||
}
|
||
}
|
||
var fonts = node.getElementsByTagName("font");
|
||
for (i = fonts.length; --i >= 0;) {
|
||
if (HTMLArea._hasClass(fonts[i], "Apple-style-span")) {
|
||
this.removeMarkup(fonts[i]);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
/***************************************************
|
||
* EVENTS HANDLERS
|
||
***************************************************/
|
typo3/sysext/rtehtmlarea/htmlarea/plugins/CopyPaste/copy-paste.js (copie de travail) | ||
---|---|---|
this.applyBrowserCommand(buttonId);
|
||
}
|
||
// In FF3, the paste operation will indeed trigger the onPaste event not in FF2; nor in Opera
|
||
// Safari does not support the paste operation
|
||
if (HTMLArea.is_opera || (HTMLArea.is_gecko && navigator.productSub < 20080514)) {
|
||
if (HTMLArea.is_opera || (HTMLArea.is_gecko && navigator.productSub < 20080514) || HTMLArea.is_safari) {
|
||
var cleanLaterFunctRef = this.getPluginInstance("DefaultClean") ? this.getPluginInstance("DefaultClean").cleanLaterFunctRef : (this.getPluginInstance("TYPO3HtmlParser") ? this.getPluginInstance("TYPO3HtmlParser").cleanLaterFunctRef : null);
|
||
if (cleanLaterFunctRef) {
|
||
window.setTimeout(cleanLaterFunctRef, 50);
|
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultClean/default-clean.js (copie de travail) | ||
---|---|---|
}
|
||
}
|
||
parseTree(this.editor._doc.body);
|
||
if (HTMLArea.is_safari) {
|
||
this.editor.cleanAppleStyleSpans(this.editor._doc.body);
|
||
}
|
||
}
|
||
});
|
||
typo3/sysext/rtehtmlarea/htmlarea/plugins/TYPO3HtmlParser/typo3html-parser.js (copie de travail) | ||
---|---|---|
|
||
clean : function() {
|
||
var editor = this.editor;
|
||
if (HTMLArea.is_safari) {
|
||
editor.cleanAppleStyleSpans(editor._doc.body);
|
||
}
|
||
var bookmark = editor.getBookmark(editor._createRange(editor._getSelection()));
|
||
var content = {
|
||
editorNo : this.editorNumber,
|