Skip to content

Client-side Commonmark to ProseMirror deserializer

What does this MR do and why?

This MR implements a module that converts a Hast Abstract Syntax Tree to a ProseMirror document.

The module exposes an API that allows mapping nodes found in a HAST tree to nodes and marks in a ProseMirror document. It creates the foundation to support more features in the future.

Context

The Content Editor uses the Markdown API to parse/render Markdown. Rendering is necessary to present an editable version of the Markdown document in a WYSIWYG editor. We are replacing this API with a client-side version that will allow us to preserve Markdown that didn’t change when the user saves changes.

Screenshots or screen recordings

This MR doesn’t introduce user-facing features.

How to set up and validate locally

This MR doesn’t introduce user-facing features.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #359019 (closed)

Edited by Enrique Alcántara

Merge request reports