Rich Markdown Editor Versions Save

The open source React and Prosemirror based markdown editor that powers Outline. Want to try it out? Create an account:

v10.1.0

3 years ago

Enhancements

  • onCreateLink handler added to support "just in time" document creation – big thanks to @thenanyu for leading this effort.
  • Link search results menu now scrolls when there are lots of results
  • CTRL+n/p now supported for navigating block menu items
  • Extension class is now exported

Fixes

  • Error when selection wraps embed nodes
  • Triangle beneath formatting toolbar sometimes positioned outside of bar
  • "Write a caption" image placeholder no longer disappears when focused
  • Link search results look better in dark theme now
  • onKeyDown handler no longer marked as required
  • Paste markdown and images now correctly disabled in readOnly mode
  • Typing a markdown link with empty text no longer triggers an error

v10.0.2

3 years ago

Fixes

  • Fixed an issue that could cause checkbox list items with escaped characters in the text to show the escape characters after reload
  • An unknown language annotation in code fences will no longer throw an error. It was only possible to hit this if you imported markdown from another source.
  • The overlay background when zooming an image now respects the theme
  • Code block language selection is now less finicky in Firefox
  • It's no longer possible to get checkbox state out of sync with view by clicking rapidly
  • Placeholder or "Type / to insert text" can no longer can appear behind images
  • Fixed an error when pasting markdown into the document
  • Pressing "Escape" key in link editor now restores editor focus

v10.0.1

3 years ago

Fixes

  • Alignment of bullet point on list items that spread across multiple lines was incorrect.
  • embeds is now an optional property, as it should have always been.

v10.0.0

3 years ago

v10.0.0 is a complete rewrite of the editor. It is incompatible with v9.0.0 and moves from using Slate to Prosemirror as the framework. Some reasoning behind this change is available in the the issue, but notably the release includes fixes for more than 20 issues, an order of magnitude increase in rendering performance, and support for soft keyboards (non-latin/mobile character input).

BREAKING CHANGES

Input / output

The output of the editor is slightly different than before. Empty paragraphs are now encoded with a backslash and checklists require a leading "-" character. Loading a document created in v9 in v10 will not render 1-1 without first migrating the data. You can do so with the following code:

import MarkdownSerializer from "slate-md-serializer";
const serializer = new MarkdownSerializer();
const nodes = serializer.deserialize(v9text);
const v10text = serializer.serialize(nodes, { version: 2 });

It is highly recommended you backup the original data.

Removed props

  • toc prop was removed. You can utilize the new getHeadings() method to build your own table of contents that matches the style of the host app, if required.
  • getLinkComponent prop was removed. It was replaced with a new structure for defining embeds.
  • plugins prop was removed. It's no longer possible to use Slate plugins, this was replaced with the extensions prop where Prosemirror plugins can be used to extend the editor instead.
  • hiddenToolbarButtons prop was removed, there is no replacement.
  • serializer prop was removed, there is no replacement.
  • theme prop keys changed to support new design.

Enhancements

Fixes

v9.0.0

5 years ago

Breaking Changes

  • renderNode prop was removed, instead create a standard Slate plugin that exposes a renderNode method. (#62)

Fixes

  • Insert/added marks are now persisted correctly (#60)
  • jpeg added to acceptable mimetypes (#66)

v8.0.0

5 years ago
  • Updated to use Slate 0.44.9

Breaking Changes

  • renderPlaceholder was removed, it's now recommend to create a placeholder plugin and pass it to the plugins prop.
  • Any custom plugins that you were passing in must now be re-written to be compatible with Slate 44. I recommend checking out the Slate Changelog

v5.1.0

5 years ago

Fixes

  • Support for underlines

v6.0.1

5 years ago

Breaking Dependency Changes

  • React 16.6.0 and upwards
  • Styled components 4.0

v4.0.0

5 years ago

This breaking change alters the return value of onChange to be a method, see details here: https://github.com/outline/rich-markdown-editor/pull/30

The load order of Slate plugins was also reversed to prefer the host apps.

v3.0.0

5 years ago

This breaking change refactors the theme file to allow for easier theming based on semantics rather than colors. Also included is a default dark theme that can be enabled with the dark boolean prop.

If you are not passing your own theme to the editor then you should be able to upgrade this major bump without issue.