-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please add RTL support #846
Comments
memo: rtlMoveVisually: boolean https://codemirror.net/doc/manual.html |
Guys, do you have any ideas how we can understand a note is written in RTL language? |
Maybe we should not detect if language per note, but per user. If user's browser settings suggest he is using RTL language then the whole app should rearrange itself. var language = window.navigator.userLanguage || window.navigator.language; |
Also found this on Stackoverflow: function isRTL(s){
var ltrChars = 'A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8\u0300-\u0590\u0800-\u1FFF'+'\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF',
rtlChars = '\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC',
rtlDirCheck = new RegExp('^[^'+ltrChars+']*['+rtlChars+']');
return rtlDirCheck.test(s);
}; |
@dariubs |
@kazup01 cancelled funding, $20, of this issue. Visit this issue on Issuehunt |
One solution can be adding a toggle-rtl option some place to change the preview mode to rtl and apply the appropriate styles to the preview pane. the settings could be consistent for each note (although not necessary). |
please add rtl language like persian to boostnote |
Would a rtl/ltr toggle suffice? @kazup01 |
@b3u That should be enough for a first version with RTL support. If we want a better way of detecting it in the future then we can add that at a later point. Thanks for wanting to implement this feature! |
There is also a direction library which checks a string and returns its direction based on the first (not neutral) character in the string. deciding the direction of each paragraph could be easier using this library, if dynamic changing of the direction is preferred. |
Hey, See #3282 any ideas on improvements? |
@ibraude could it be possible to add a |
@tuxitop Yeah, good catch. I added that and also an option to set up a hotkey for direction toggle |
Do we have any fix or work around for this issue? |
afaik, yes. See #3282 |
Please paste some screenshots with the developer tool open if you report a bug.
The text was updated successfully, but these errors were encountered: