DEV Community

Cover image for Introducing Milkdown: A plugin driven WYSIWYG markdown editor
Mirone
Mirone

Posted on

Introducing Milkdown: A plugin driven WYSIWYG markdown editor

Overview

Milkdown is a lightweight but powerful WYSIWYG markdown editor. It's made up by two parts:

  • A tiny core which provide markdown parser, serializer and kinds of plugin loader.
  • Lots of plugins provide syntax, commands and components.

With this pattern you can enable or disable any custom syntax you like, such as table, latex and slash commands.
You can even create your own plugin to support your awesome idea.


Links

Features

  • ๐Ÿ“ WYSIWYG Markdown - Write markdown in an elegant way
  • ๐ŸŽจ Themable - Theme can be shared and used with npm packages
  • ๐ŸŽฎ Hackable - Support your awesome idea by plugin
  • ๐Ÿฆพ Reliable - Built on top of prosemirror and remark
  • โšก๏ธ Slash & Tooltip - Write fast for everyone, driven by plugin
  • ๐Ÿงฎ Math - LaTeX math equations support, driven by plugin
  • ๐Ÿ“Š Table - Table support with fluent ui, driven by plugin

Tech Stack

Milkdown is built on top of these tools:

  • Prosemirror and it's community - A toolkit for building rich-text editors on the web
  • Remark and it's community - Markdown parser done right
  • Postcss - Powerful css tool to build theme
  • TypeScript - Developed by typescript
  • Prism - Code snippets support
  • Katex - LaTex math rendering

First editor

We have some pieces for you to create a very minimal editor:

We use material icon and Roboto Font in our theme.
Make sure to include them for having the best experience.

import { Editor } from '@milkdown/core';
import { commonmark } from '@milkdown/preset-commonmark';

// import theme
import '@milkdown/theme-nord/lib/theme.css';

const root = document.body;
new Editor({ root }).use(commonmark).create();
Enter fullscreen mode Exit fullscreen mode

For further information, please visit our website.

Top comments (0)