esm7 / obsidian-rtl

RTL support for Obsidian.md
MIT License
136 stars 11 forks source link

RTL is not working in canvas #51

Closed SalahThabet1 closed 1 year ago

SalahThabet1 commented 1 year ago

Hi, the plugin works great ,but it's not working at all in canvas. I tested it with a new vault to ensure it wasn't another plugin confict. the dynamic rtl plugin works in canvas , but messes up direction elsewhere in files.

esm7 commented 1 year ago

Oh indeed I haven't tested the auto mode in canvas, but it seems to be an easy fix. Will get to it in the upcoming days.

esm7 commented 1 year ago

Well, turns out this is very far off from an "easy fix", and especially the part of getting the plugin to fully work when editing a note inside a canvas requires some major restructuring of the code :sweat_smile: But making it work flawlessly in canvas seems well-worth the trouble and I'm working on it.

esm7 commented 1 year ago

I spent many hours on this today and I got it working, with a few drawbacks:

  1. Can't change a note direction from inside the canvas (to change a direction you need to open the note, change its direction to RTL/LTR/Auto and then reopen the canvas).
  2. Still a few minor hiccups with details like callouts inside a canvas.

I don't know if I'll continue working on #1 soon (fixing it requires some more restructuring of the existing code), depending on how much this imperfection will bother me and of course user feedback... Do you mind testing it and verify it works for you as expected? (you'd need to extract the attached zip into VAULT_DIR/.obsidian/plugins/obsidian-rtl, making sure you overwrite the 3 old files. If you get unexpected behavior with this beta, just uninstall and reinstall the plugin via the Obsidian settings.)

rtl.zip

EDIT - I found issue #3: doesn't currently work with canvas cards that are not vault notes. Gotta work on fixing that.

esm7 commented 1 year ago

Here's a more mature version that I think I can call a release candidate. rtl.zip

esm7 commented 1 year ago

Released.