Bug #22969 » rtehtmlarea_bugfix_14830_v3_trunk.patch
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail) | ||
---|---|---|
setOptions: function () {
|
||
if (!Ext.isIE) {
|
||
try {
|
||
if (this.document.queryCommandEnabled('insertbronreturn')) {
|
||
this.document.execCommand('insertbronreturn', false, this.config.disableEnterParagraphs);
|
||
if (this.document.queryCommandEnabled('insertBrOnReturn')) {
|
||
this.document.execCommand('insertBrOnReturn', false, this.config.disableEnterParagraphs);
|
||
}
|
||
if (this.document.queryCommandEnabled('styleWithCSS')) {
|
||
this.document.execCommand('styleWithCSS', false, this.config.useCSS);
|
||
... | ... | |
return false;
|
||
}
|
||
if (event.shiftKey || this.config.disableEnterParagraphs) {
|
||
this.getEditor()._detectURL(event);
|
||
var editor = this.getEditor();
|
||
editor._detectURL(event);
|
||
if (Ext.isSafari) {
|
||
var brNode = editor.document.createElement('br');
|
||
editor.insertNodeAtSelection(brNode);
|
||
brNode.parentNode.normalize();
|
||
// Selection issue when an URL was detected
|
||
if (editor._unlinkOnUndo) {
|
||
brNode = brNode.parentNode.parentNode.insertBefore(brNode, brNode.parentNode.nextSibling);
|
||
}
|
||
if (!brNode.nextSibling || !/\S+/i.test(brNode.nextSibling.textContent)) {
|
||
var secondBrNode = editor.document.createElement('br');
|
||
secondBrNode = brNode.parentNode.appendChild(secondBrNode);
|
||
}
|
||
editor.selectNode(brNode, false);
|
||
event.stopEvent();
|
||
}
|
||
}
|
||
// Update the toolbar state after some time
|
||
this.getToolbar().updateLater.delay(200);
|