To be seen correctly in Talk. The original post is re-formatted.
found a possible solution, I’ve modified the copyStyles
function in $:/core/modules/editor/engines/framed.js
by adding removeProperty('direction')
, it is no longer forces the direction to ltr
FramedEngine.prototype.copyStyles = function() {
// Copy all styles
$tw.utils.copyStyles(this.dummyTextArea,this.domNode);
// Override the ones that should not be set the same as the dummy textarea
this.domNode.style.display = "block";
this.domNode.style.width = "100%";
this.domNode.style.margin = "0";
// In Chrome setting -webkit-text-fill-color overrides the placeholder text colour
this.domNode.style["-webkit-text-fill-color"] = "currentcolor";
this.domNode.style.removeProperty('direction'); /// <-- this will remove the direction:ltr from the editor style
};