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
};
```
On Friday, April 21, 2023 at 11:37:34 PM UTC+3:30 Amit Shady wrote:

> 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 };
>
> On Monday, April 17, 2023 at 9:05:29 PM UTC+3 Amit Shady wrote:
>
>> Hello,
>>
>> I'm facing an issue while editing a tiddler where I'm unable to switch 
>> between RTL/TLR using the "Control+Shift" shortcut. I have noticed that 
>> this problem is resolved when I hide the toolbar, but I haven't been able 
>> to find any solutions to this issue online.
>>
>> Can anyone suggest a possible solution to fix this issue?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ee964a20-0501-475a-95ec-4115ee07a5den%40googlegroups.com.

Reply via email to