mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-09 04:26:36 +08:00
Added base RTL support
For #939 - Adds way to check if current language is RTL via config system. - Made TinyMCE default direction be based on current language text direction. - Fixed bullet points to be RTL compatible. - Set page content body to have direction based on content.
This commit is contained in:
@ -8,6 +8,7 @@ class MarkdownEditor {
|
||||
|
||||
constructor(elem) {
|
||||
this.elem = elem;
|
||||
this.textDirection = document.getElementById('page-editor').getAttribute('text-direction');
|
||||
this.markdown = new MarkdownIt({html: true});
|
||||
this.markdown.use(mdTasksLists, {label: true});
|
||||
|
||||
@ -98,6 +99,9 @@ class MarkdownEditor {
|
||||
|
||||
codeMirrorSetup() {
|
||||
let cm = this.cm;
|
||||
// Text direction
|
||||
// cm.setOption('direction', this.textDirection);
|
||||
cm.setOption('direction', 'ltr'); // Will force to remain as ltr for now due to issues when HTML is in editor.
|
||||
// Custom key commands
|
||||
let metaKey = code.getMetaKey();
|
||||
const extraKeys = {};
|
||||
|
Reference in New Issue
Block a user