bastihilger / nova-tiptap

Laravel Nova Tiptap Field
MIT License
172 stars 61 forks source link

RTL support #48

Closed Aliaaaam closed 2 years ago

Aliaaaam commented 2 years ago

Is there any way to add rtl support as well?

bastihilger commented 2 years ago

Hi @Aliaaaam, I would like to help here, but I need to know more exactly what you had in mind. Would it be enough that all block elements inside the editor had the attribute dir="auto", so that they automatically are RTL when using for example arabic text? Or is it needed to have an option to set the whole editor to dir="rtl" ?

Aliaaaam commented 2 years ago

Hey @manogi I think having a button to switch between dir="rtl" and dir="ltr" in blocks is more appropriate in terms of UX, although having dir="auto" is completely okay and quickly can be implemented with the current scheme.

bastihilger commented 2 years ago

RTL is now supported as button that switches rtl on and off:

CleanShot 2022-01-10 at 12 47 54@2x

CleanShot 2022-01-10 at 12 48 30@2x