humhub / humhub-prosemirror

Other
17 stars 8 forks source link

RTL support #23

Open rezaervani opened 3 years ago

rezaervani commented 3 years ago

I read here : https://github.com/humhub/humhub-prosemirror/issues/12 that humhub add some features to prosemirror like plugin system. Is there any documentation of it ? Or if I have to refer to prosemirror documentation, on which part ?

I found that every single function of button in humhub-prosemirror-richeditor is separated into single plugin humhub/protected/vendor/npm-asset/humhub-prosemirror-richtext/src/editor/core/plugins

And at least there are two files in every plugin : index.js and schema.js - in some plugins I also found input-rules.js and menu.js

Let said, that I want to add RTL plugin to my humhub-prosemirror, what should I do ? I've tried compare this to the most simple example at prosemirror git, that is prosemirror-menu-master. But I still can't get the idea how humhub-prosemirror-richtext work

I am really interested to learn much more about this. Where should I start ?

Thank you,

buddh4 commented 3 years ago

See https://discuss.prosemirror.net/t/does-prosemirror-support-rtl-languages-editing/1318 which suggests you probably just have to change your theme (or just add a simple css rule) for this. Can you test the direction style mentioned in this issue and let me know if this works. Maybe we could change the direction by language in v1.8.

buddh4 commented 3 years ago

Oh, just saw that you already answered in the mentioned issue, if you need help with applying the style let me know.

buddh4 commented 3 years ago

I leave this here just for me in order to implement rtl detection in the core:

buddh4 commented 3 years ago

Duplicate https://github.com/humhub/humhub-prosemirror/issues/22

rezaervani commented 3 years ago

Thank you, I've tried this for 2 weeks, and get some progress. But I have to split file humhub-editor.js into some files to make my learning more simple.

I'll inform if finally I can make it done

Thank you