Releases: outline/rich-markdown-editor
Release list
v10.1.0
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
Extensionclass 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
onKeyDownhandler no longer marked as required- Paste markdown and images now correctly disabled in
readOnlymode - Typing a markdown link with empty text no longer triggers an error
v10.0.2
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
v10.0.0
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
tocprop was removed. You can utilize the newgetHeadings()method to build your own table of contents that matches the style of the host app, if required.getLinkComponentprop was removed. It was replaced with a new structure for defining embeds.pluginsprop was removed. It's no longer possible to use Slate plugins, this was replaced with theextensionsprop where Prosemirror plugins can be used to extend the editor instead.hiddenToolbarButtonsprop was removed, there is no replacement.serializerprop was removed, there is no replacement.themeprop keys changed to support new design.
Enhancements
- We now export Typescript types.
- New menu for inserting blocks is much more intuitive than before
- "Highlight" now appears in floating formatting menu
- Typing markdown shortcuts no longer requires
spacecharacter to activate - It's now possible to type a markdown url #5
- The markdown output is much cleaner #49
- Quotes are converted to smart quotes as you type #81
- It's now possible to change the editor value from outside by changing the
valueprop. #120 - Toolbar adjusts to not display off-screen #117
- It is now possible for custom embeds to be displayed in the block menu
onShowToastcallback now includes anidas the second parameter that can be used to identify the message and provide your own text copy.- Support for paragraph breaks in lists.
- Support for links in headings.
Fixes
- Mobile input #141
- Support for alternative input methods #126
- Rendering performance increased by leaps and bounds #29
- Issues with markdown shortcuts surrounded in whitespace not applying #110
- Key handling in link editor #100
- Adding a new row to a table now respects alignment #91
- Many other errors throwing from the editor that were not captured in the issue tracker.
v9.0.0
v8.0.0
- Updated to use Slate
0.44.9
Breaking Changes
renderPlaceholderwas removed, it's now recommend to create a placeholder plugin and pass it to thepluginsprop.- 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
v6.0.1
v5.1.0
v4.0.0
v3.0.0
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.