From ef0f065954d569ccc7430bbc9f66af3b2a7a4c94 Mon Sep 17 00:00:00 2001 From: BurningTreeC Date: Sun, 20 Oct 2024 19:35:48 +0200 Subject: [PATCH] use editDirection in simple.js and framed.js --- core/modules/editor/engines/framed.js | 3 +++ core/modules/editor/engines/simple.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/core/modules/editor/engines/framed.js b/core/modules/editor/engines/framed.js index 34d11dec7..911cdf180 100644 --- a/core/modules/editor/engines/framed.js +++ b/core/modules/editor/engines/framed.js @@ -81,6 +81,9 @@ function FramedEngine(options) { if(this.widget.isDisabled === "yes") { this.domNode.setAttribute("disabled",true); } + if(this.widget.editDirection) { + this.domNode.setAttribute("dir",this.widget.editDirection); + } // Copy the styles from the dummy textarea this.copyStyles(); // Add event listeners diff --git a/core/modules/editor/engines/simple.js b/core/modules/editor/engines/simple.js index 809dc58ea..2fd408aec 100644 --- a/core/modules/editor/engines/simple.js +++ b/core/modules/editor/engines/simple.js @@ -58,6 +58,9 @@ function SimpleEngine(options) { if(this.widget.isDisabled === "yes") { this.domNode.setAttribute("disabled",true); } + if(this.widget.editDirection) { + this.domNode.setAttribute("dir",this.widget.editDirection); + } // Add an input event handler $tw.utils.addEventListeners(this.domNode,[ {name: "focus", handlerObject: this, handlerMethod: "handleFocusEvent"},