]> BookStack Code Mirror - bookstack/commit
WYSIWYG: Added text direction support for code editor popup
authorDan Brown <redacted>
Fri, 3 May 2024 12:35:30 +0000 (13:35 +0100)
committerDan Brown <redacted>
Fri, 3 May 2024 12:40:00 +0000 (13:40 +0100)
commitf9e087330b5d90ed5ec23ac0725cfeccd1eb7cb5
tree9e3cf0267228d482c5f0d4ac90eff1eda1af24f9
parent4c1c3155940bd0020117d3bd60772fc3b2759fea
WYSIWYG: Added text direction support for code editor popup

Editor popup will now reflect the direction of the opened code block.
This also updates in-editor codemirror instances to correcly reflect/use
the direction if set on the inner code elem.

This also defaults new code blocks, when in RTL languages, to be started
in LTR, which can then be changed via in-editor direction controls if
needed. This is on the assumption that most code will be LTR (could not
find much examples of RTL code use).

Fixes #4943
resources/js/code/index.mjs
resources/js/components/code-editor.js
resources/js/wysiwyg/plugin-codeeditor.js
resources/sass/_components.scss