A community plugin for LearnHarness. It makes lessons readable in Persian, Arabic and Hebrew.
LearnHarness renders lesson prose left to right. A Persian, Arabic or Hebrew sentence mixed with English words, numbers or punctuation scrambles. This plugin is a temporary workaround until the fix lands in LearnHarness itself (upstream PRs #968 and #1051, issue #758).
Unofficial. Not affiliated with LearnHarness, and not endorsed by it.
Prose blocks that contain RTL script get dir="auto", so a Persian paragraph reads right to left and an English paragraph in the same chat stays left to right. Code fences, inline code, KaTeX math and numbers stay left to right.
The whole session pane gets dir="rtl" by default: the top bar, the transcript, the question and practice docks and the composer. The sidebar, settings dialogs, home and graph stay as they are.
If something looks broken, turn full-chat RTL off in the plugin settings. Prose-only mode stays on.
Requires LearnHarness 0.6.0 or later. No build step.
-
Download
rtl-support.zipfrom the latest release: Download rtl-support.zip (latest release). The link always points to the newest release. The release page is at https://github.com/emadn87-dev/learnharness-rtl-plugin/releases/latest if you want to check it first. -
Unzip the file and copy the
rtl-supportfolder into your LearnHarness plugins folder. The folder path is shown in LearnHarness under Settings, Community plugins. On Windows it is:C:\Users\<you>\AppData\Roaming\LearnHarness\data\plugins\When you are done, this file must exist:
.../plugins/rtl-support/dist/manifest.jsonThe folder name must be exactly
rtl-support. It has to match the plugin id. -
In LearnHarness, go to Settings, Community plugins, press Refresh, and enable RTL Support. Then quit LearnHarness completely and open it again.
-
Open a teaching session in Persian, Arabic or Hebrew. The chat, the questions and the writing box should now read right to left, while code and math stay left to right.
If a passage still renders wrong, use the Apply RTL Support action in the session top bar or sidebar.
git clone https://github.com/emadn87-dev/learnharness-rtl-plugin.git "<plugins-directory>/rtl-support"Then follow steps 3 and 4 above.
Disable the plugin in Settings, Community plugins, then delete the rtl-support folder from the plugins directory.
No build step, no model calls, no network calls, no file reads.
dist/manifest.jsonis the plugin manifest (API v1).dist/main.jsuses a MutationObserver. It setsdir="auto"on RTL prose blocks, forces code and math back todir="ltr", and setsdir="rtl"on the session pane.dist/styles.csssetsunicode-bidi: plaintextfor paragraphs, plus manual fixes for thingsdiralone does not flip: the user-message rail, the session title and the option rows.
One localStorage key, rtl-support:full-chat, remembers the full-chat toggle.
MIT. See LICENSE.