Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Codex RTL AlignmentNew to Visual Studio Code? Get it now.
Codex RTL Alignment

Codex RTL Alignment

OfirMeguri

|
2 installs
| (0) | Free
Adds an ⇄ toggle button to the Codex panel title that right-aligns Hebrew, Arabic & Persian messages (RTL) while keeping code blocks LTR. Reversible — never permanently modifies Codex or VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Codex RTL

Adds an ⇄ toggle button to the Codex panel's title bar that right-aligns Hebrew, Arabic and Persian messages (RTL) while keeping code blocks left-to-right.

  • Click the ⇄ button in the Codex view title (or the Codex RTL status-bar item) to turn RTL on/off. Reload the window when prompted.
  • Latin text stays LTR, Hebrew/Arabic/Persian text becomes RTL, and each block is detected independently so mixed conversations render correctly.
  • Code, <pre> blocks and tables are always kept LTR and bidi-isolated.

How it works

VS Code renders the Codex chat inside an isolated webview iframe, and there is no supported API for one extension to style another extension's webview. So this extension applies RTL the only way that actually reaches the Codex webview: it appends a small, marker-delimited runtime to Codex's own webview entry bundle (openai.chatgpt-*/webview/assets/index-*.js).

The injection is:

  • Reversible — turning RTL off (or disabling/uninstalling this extension) strips the block and restores the Codex bundle exactly.
  • Idempotent & self-healing — re-applied automatically after a Codex update replaces the bundle.
  • CSP-safe — alignment is applied via JS-set inline styles (not a <style> element), which the Codex webview's Content-Security-Policy would otherwise block.

VS Code itself is never modified.

Develop

npm install
npm run build     # bundles src -> dist/extension.js with esbuild

Commands: Codex RTL: Toggle / Enable / Disable / Status.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft