Switch text direction based on input language.
Auto RTL/LTR Switcher Extension
In many forms, text fields are often set to left-to-right by default, making typing difficult and reducing readability for languages like Persian. That’s why I decided to create this simple extension, which automatically switches the text direction as you type.
When a user starts typing in any input field, the extension detects the input language. If the text contains Persian characters, the direction is set to right-to-left (RTL); if it’s in Latin, the direction switches to left-to-right (LTR).
Read more
When a user starts typing in any input field, the extension detects the input language. If the text contains Persian characters, the direction is set to right-to-left (RTL); if it’s in Latin, the direction switches to left-to-right (LTR).
Source Manifest.json
{"update_url": "https://clients2.google.com/service/update2/crx", "manifest_version": 3, "name": "Auto RTL/LTR Switcher", "version": "1.5.3", "description": "Switch text direction based on input language.", "permissions": [], "icons": { "16": "icon16.png", "32": "icon32.png", "48": "icon48.png", "128": "icon128.png" }, "host_permissions": [""], "content_scripts": [ { "matches": [""], "js": ["content.js"] } ]}
Read more