Markdown Editor / Preview
Write Markdown and see the result live. The rendering is done safely, building elements via the DOM (no innerHTML), so text and links from your content never turn into executable HTML.
Write Markdown and see the result live. The rendering is done safely, building elements via the DOM (no innerHTML), so text and links from your content never turn into executable HTML.
Markdown is a lightweight markup language, created for writing formatted text using a syntax that is simple to read and write. It's widely used in READMEs, documentation, GitHub issues, forums and notes. This editor converts the Markdown into HTML and shows the result immediately alongside it.
# to ###### (h1 to h6).**text**.*text*.`code`.-/* or numbered (1.).[text](url).>.---.
Since the preview is real rendered HTML, it was built with special attention to
XSS. All content is assembled with document.createElement and
textContent — never innerHTML. Each link's URL is validated: only
http:, https:, mailto: and relative paths are accepted;
schemes like javascript: are rejected and the link becomes plain text.
The one described above. Out of scope (for now): tables, images, embedded HTML, nested
lists, task lists, footnotes, emphasis with _/__ and
syntax highlighting in code blocks.