Bug #22607 » rtehtmlarea_bugfix_14333_typo3_4-3.patch
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail) | ||
---|---|---|
var range = this._createRange(selection);
|
||
if (HTMLArea.is_gecko) {
|
||
var parentStart = range.startContainer;
|
||
if (/^(body)$/i.test(parentStart.nodeName)) {
|
||
parentStart = parentStart.firstChild;
|
||
}
|
||
var parentEnd = range.endContainer;
|
||
if (/^(body)$/i.test(parentEnd.nodeName)) {
|
||
parentEnd = parentEnd.lastChild;
|
||
}
|
||
} else {
|
||
if (selection.type !== "Control" ) {
|
||
var rangeEnd = range.duplicate();
|
typo3/sysext/rtehtmlarea/htmlarea/plugins/BlockElements/block-elements.js (copie de travail) | ||
---|---|---|
if (endBlocks.start === endBlocks.end) {
|
||
--index;
|
||
}
|
||
for (var block = startAncestors[index]; block; block = block.nextSibling) {
|
||
if (HTMLArea.isBlockElement(block)) {
|
||
switch (buttonId) {
|
||
case "Indent" :
|
||
if (!HTMLArea._hasClass(block, this.useClass[buttonId])) {
|
||
HTMLArea._addClass(block, this.useClass[buttonId]);
|
||
}
|
||
break;
|
||
case "Outdent" :
|
||
if (HTMLArea._hasClass(block, this.useClass["Indent"])) {
|
||
HTMLArea._removeClass(block, this.useClass["Indent"]);
|
||
}
|
||
break;
|
||
case "JustifyLeft" :
|
||
case "JustifyCenter" :
|
||
case "JustifyRight" :
|
||
case "JustifyFull" :
|
||
this.toggleAlignmentClass(block, buttonId);
|
||
break;
|
||
default :
|
||
break;
|
||
if (!/^(body)$/i.test(startAncestors[index].nodeName)) {
|
||
for (var block = startAncestors[index]; block; block = block.nextSibling) {
|
||
if (HTMLArea.isBlockElement(block)) {
|
||
switch (buttonId) {
|
||
case "Indent" :
|
||
if (!HTMLArea._hasClass(block, this.useClass[buttonId])) {
|
||
HTMLArea._addClass(block, this.useClass[buttonId]);
|
||
}
|
||
break;
|
||
case "Outdent" :
|
||
if (HTMLArea._hasClass(block, this.useClass["Indent"])) {
|
||
HTMLArea._removeClass(block, this.useClass["Indent"]);
|
||
}
|
||
break;
|
||
case "JustifyLeft" :
|
||
case "JustifyCenter" :
|
||
case "JustifyRight" :
|
||
case "JustifyFull" :
|
||
this.toggleAlignmentClass(block, buttonId);
|
||
break;
|
||
default :
|
||
break;
|
||
}
|
||
}
|
||
if (block == endAncestors[index]) {
|
||
break;
|
||
}
|
||
}
|
||
if (block == endAncestors[index]) {
|
||
break;
|
||
}
|
||
}
|
||
},
|
||
|
- « Previous
- 1
- 2
- 3
- Next »