So funktioniert es
Markdown is a plain-text convention that a parser converts to HTML. The core syntax — headings with leading hashes, emphasis with asterisks or underscores, links and images in bracket and parenthesis form, lists, blockquotes and fenced code blocks — is stable and defined by the CommonMark specification. Everything beyond that comes from extensions, which is why the same document renders differently in two systems and why the toggles here exist: GitHub Flavored Markdown adds tables, task lists, strikethrough and autolinks, and the line-breaks option decides whether a single newline inside a paragraph produces a line break in the output or is collapsed into a space.
The preview is sanitised because Markdown permits raw HTML, and raw HTML in a document pasted from anywhere is a script-injection risk. The rendered output is parsed by the browser's own HTML parser and rebuilt from an allow-list: known-safe elements and attributes survive, script, style, iframe, form and SVG are dropped, every event handler attribute is removed, javascript: URLs are rejected, and links that leave the site are given rel noopener and nofollow. The result is a preview that renders what a browser would render for the parts that are safe, without executing anything.
The outline is derived from the source rather than from the rendered DOM, which matters because the renderer is loaded lazily and asynchronously while the outline updates instantly on every keystroke. Fenced code blocks are tracked so that a hash inside a shell comment is not mistaken for a heading — a detail that any naive heading scan gets wrong on a document that contains code. Statistics for words, characters, lines and reading time are computed from the same pass.
Export produces either the Markdown source or a complete HTML document with a doctype, a UTF-8 meta tag and the sanitised body. The HTML export is deliberately self-contained and unstyled beyond semantic elements, so it can be opened in a browser, pasted into a CMS that accepts HTML, or used as the starting point for a styled page. What it will not do is preserve Markdown extensions your target renderer does not support — tables converted to HTML stay tables, but a footnote syntax specific to one implementation may not survive.
Typische Anwendungsfälle
- Write a README and check that the tables and code blocks render before committing it.
- Draft release notes or documentation and export them as HTML for a CMS or an email.
- Preview a Markdown file someone else wrote to see the intended structure.
- Convert a Markdown document to HTML to paste into a system with no Markdown support.
- Check the outline of a long document to see whether its heading structure is consistent.
- Paste untrusted Markdown and see what its raw HTML would do before publishing it anywhere.
Zuletzt aktualisiert: 2026-10-14 — der Artikeltext wird auf Englisch angezeigt; die Oberfläche ist übersetzt.