Project

General

Profile

Feature #18078 ยป rtehtmlarea_feature_7318.patch

Administrator Admin, 2008-01-30 06:12

View differences:

typo3/sysext/rtehtmlarea/htmlarea/plugins/Language/language.js (working copy)
var direction = (buttonId == "RightToLeft") ? "rtl" : "ltr";
var el = this.editor.getParentElement();
while (el && !HTMLArea.isBlockElement(el)) {
el = el.parentNode;
}
if (el) {
el.style.direction = (el.style.direction == direction) ? "" : direction;
if (el.nodeName.toLowerCase() === "bdo") {
el.dir = direction;
} else {
el.dir = (el.dir == direction || el.style.direction == direction) ? "" : direction;
}
el.style.direction = "";
}
return false;
......
buttonId = buttonList[i][0];
if (this.isButtonInToolbar(buttonId)) {
var el = this.editor.getParentElement();
while (el && !HTMLArea.isBlockElement(el)) {
el = el.parentNode;
}
if (el) {
this.editor._toolbarObjects[buttonId].state("active",(el.style.direction == ((buttonId == "RightToLeft") ? "rtl" : "ltr")));
var direction = (buttonId === "RightToLeft") ? "rtl" : "ltr";
this.editor._toolbarObjects[buttonId].state("active",(el.dir == direction || el.style.direction == direction));
}
}
}
    (1-1/1)