UI Update: RTL/LTR Toggle Reposition & Behavior Improvement#95
Merged
ThisIs-Developer merged 1 commit intomainfrom May 8, 2026
Merged
Conversation
…to editor/preview only - Move direction toggle from header toolbar to markdown formatting toolbar, placed directly after the Align Right button - Change toggle display from icon to text: L (LTR mode) / R (RTL mode) - Scope direction changes to only editor textarea and preview area, no longer affects full document/toolbar/sidebar/modals - Update mobile direction toggle to use the same scoped behavior Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Deploying markdownviewer with
|
| Latest commit: |
32a0a3e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c7962223.markdownviewer.pages.dev |
| Branch Preview URL: | https://devin-1778216070-rtl-ltr-tog.markdownviewer.pages.dev |
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Deploying markdown-viewer with
|
| Latest commit: |
32a0a3e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ffb0b8d2.markdown-viewer.pages.dev |
| Branch Preview URL: | https://devin-1778216070-rtl-ltr-tog.markdown-viewer.pages.dev |
Contributor
Author
End-to-End Test ResultsTested on preview deployment: https://ffb0b8d2.markdown-viewer.pages.dev All 7 tests passed. Test Results
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves the RTL/LTR direction toggle from the header toolbar (next to Share) into the markdown formatting toolbar, directly beside the Align Right button. Changes the toggle's visual from an ambiguous icon to a clear text label: L when in LTR mode, R when in RTL mode. Most importantly, scopes the
dirattribute change to only the editor textarea (#markdown-editor) and preview area (#markdown-preview) instead ofdocument.documentElement, so the toolbar, sidebar, modals, and overall app layout are no longer affected by the toggle.Changes:
index.html: Removeddirection-togglefrom header toolbar; added it to the alignment group in the formatting toolbar as amarkdown-tool-btn text-toolscript.js: IntroducedapplyDirectionToContent()helper that setsdiron only the editor and preview elements. UpdatedupdateDirectionToggleUI()to settextContent("L"/"R") instead of swapping icons. Updated both desktop and mobile click handlers to read/write direction on the editor element rather thandocument.documentElement.Review & Testing Checklist for Human
Notes
.markdown-tool-btn.text-toolstyles..click()when present; the standalone fallback path also uses the newapplyDirectionToContent().directionstate is still read frommarkdownEditor.getAttribute("dir")— ifmarkdownEditoris ever null, it defaults to"ltr".Link to Devin session: https://app.devin.ai/sessions/4ffa89663674457e98ce1644dec5cd81
Requested by: @ThisIs-Developer