Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js (révision 6650) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js (copie de travail) @@ -737,13 +737,15 @@ first.innerHTML = "
"; this.editor.selectNodeContents(first,true); } else { + // parentElement may be removed by following command + var parentNode = parentElement.parentNode; try { this.editor._doc.execCommand(buttonId, false, null); } catch(e) { this.appendToLog("onButtonPress", e + "\n\nby execCommand(" + buttonId + ");"); } if (HTMLArea.is_safari) { - this.cleanAppleSpanTags(parentElement); + this.editor.cleanAppleStyleSpans(parentNode); } } }, @@ -860,18 +862,6 @@ }, /* - * Clean Apple span tags - */ - cleanAppleSpanTags : function(element) { - var spans = element.getElementsByTagName("span"); - for (var i = spans.length; --i >= 0;) { - if (HTMLArea._hasClass(spans[i], "Apple-style-span")) { - this.editor.removeMarkup(spans[i]); - } - } - }, - - /* * Make XHTML-compliant nested list * We need this for Opera */