📝A simple and elegant markdown editor, available for Linux, macOS and Windows. https://www.marktext.me
  • TypeScript 71.7%
  • JavaScript 14%
  • CSS 8.2%
  • Vue 5.8%
  • HTML 0.2%
Find a file
Ran Luo 43bd8b7779
fix(desktop): preserve RTL text direction in PDF and print export (#4874)
* fix(desktop): preserve RTL text direction in PDF and print export

RTL documents (e.g. Persian) exported to PDF or printed came out
left-aligned with reversed word order, even though the editor renders
them right-to-left.

#4553 added `dir` to the exporter's `<html>` shell, which works for the
styled-HTML export (written to disk verbatim). But the PDF/print path
feeds that HTML through `printer.renderMarkdown(html)`, which assigns it
to `printContainer.innerHTML` — dropping the outer `<html dir=…>` wrapper
so only body content survives. The print container is appended to
`document.body` as a sibling of `.editor-wrapper` (which holds the live
`dir`), so it inherits no direction and `printToPDF` prints it LTR.

Propagate the direction onto the print container itself, mirroring how
the editor applies `dir` to its wrapper. LTR stays implicit to keep
existing exports unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(desktop): cover RTL direction on the print container

Pin that the PDF/print container carries `dir=rtl`/`auto` and stays
implicit for LTR and the unset default (#4833).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 00:07:25 +08:00
.github docs: add commenting guidelines (#4738) 2026-06-26 14:04:10 +08:00
.vscode refactor: rewrite getTOC and remove unused comments (#4642) 2026-06-23 07:33:14 +08:00
docs Add Bengali README and links (#4823) 2026-07-04 09:36:33 +08:00
packages fix(desktop): preserve RTL text direction in PDF and print export (#4874) 2026-07-06 00:07:25 +08:00
scripts feat(muya): migrate TS rewrite to packages/muya alongside legacy muyajs (#4314) 2026-05-29 20:35:48 +08:00
.editorconfig Re-Factor MarkText with electron-vite (#4001) 2026-05-13 12:18:49 +08:00
.gitignore chore(muya): align packages/muya conventions with desktop + doc cleanup (#4450) 2026-06-11 11:49:21 +08:00
.npmrc feat: migrate package manager from npm to pnpm (#4213) 2026-05-15 23:28:33 +08:00
.prettierignore chore(muya): align packages/muya conventions with desktop + doc cleanup (#4450) 2026-06-11 11:49:21 +08:00
.prettierrc.yaml Re-Factor MarkText with electron-vite (#4001) 2026-05-13 12:18:49 +08:00
CLAUDE.md docs: add commenting guidelines (#4738) 2026-06-26 14:04:10 +08:00
eslint.config.js feat(muya): migrate TS rewrite to packages/muya alongside legacy muyajs (#4314) 2026-05-29 20:35:48 +08:00
LICENSE Removed the space in 'Mark Text' (#2763) (#2782) 2021-12-25 21:05:58 +08:00
package.json chore(deps): upgrade all packages to latest + align shared versions (#4597) 2026-06-21 08:40:30 +08:00
pnpm-lock.yaml fix(desktop): save files atomically to prevent data loss on crash (#4852) 2026-07-05 10:58:29 +08:00
pnpm-workspace.yaml feat(muya): migrate TS rewrite to packages/muya alongside legacy muyajs (#4314) 2026-05-29 20:35:48 +08:00
README.md Add Bengali README and links (#4823) 2026-07-04 09:36:33 +08:00

MarkText

MarkText

🔆 Next generation markdown editor 🌙
A simple and elegant open-source markdown editor that focused on speed and usability.
Available for Linux, macOS and Windows.

This Markdown editor that could. Built with ❤︎ by Jocs and contributors .

Sponsors

MarkText is an open-source Markdown editor powered by the support of its community. If MarkText improves your workflow, please consider sponsoring the project. Thank you to all the sponsors ❤️

Special Sponsor

Scrape Google and other search engines from our fast, easy, and complete API.
Secure hardware wallet made simple.

Screenshot

Features

  • Realtime preview (WYSIWYG) and a clean and simple interface to get a distraction-free writing experience.
  • Support CommonMark Spec, GitHub Flavored Markdown Spec and selective support Pandoc markdown.
  • Markdown extensions such as math expressions (KaTeX), front matter and emojis.
  • Support paragraphs and inline style shortcuts to improve your writing efficiency.
  • Output HTML and PDF files.
  • Various themes: Cadmium Light, Material Dark etc.
  • Various editing modes: Source Code mode, Typewriter mode, Focus mode.
  • Paste images directly from clipboard.

Download and Installation

platform

Download for macOS Download for Windows Download for Linux

Want to see new features of the latest version? Please refer to CHANGELOG.

macOS

Requires macOS 11 (Big Sur) or later. Universal builds aren't published — pick the matching arm64 or x64 installer.

You can either download the latest marktext-mac-(arm64|x64)-%version%.dmg from the release page or install MarkText using homebrew cask. To use Homebrew-Cask you just need to have Homebrew installed.

brew install --cask mark-text

Windows

Requires Windows 10 or 11. Both x64 and arm64 installers are published — pick the architecture that matches your machine.

Simply download and install MarkText via the setup wizard (marktext-win-(x64|arm64)-%version%-setup.exe) and choose whether to install per-user or machine wide. Alternatively, install MarkText using a package manager such as Chocolatey or Winget.

To use Chocolatey, you need to have Chocolatey installed:

choco install marktext

To use Winget, you need to have Winget installed:

winget install marktext

Linux

Please follow the Linux installation instructions.

Other

All binaries for Linux, macOS and Windows can be downloaded from the release page. If a version is unavailable for your system, then please open an issue.

Development

If you wish to build MarkText yourself, please check out our build instructions.

If you have any questions regarding MarkText, you are welcome to write an issue. When doing so please use the default format found when opening an issue. Of course, if you submit a PR directly, it will be greatly appreciated.

Contribution

MarkText is in development, please make sure to read the Contributing Guide before making a pull request. Want to add some features to MarkText? Refer to our roadmap and open issues.

Contributors

Thank you to all the people who have already contributed to MarkText[contributors].

License

MIT.