FEATURE: introduce a ProseMirror editor (#30815)

This is the first in a series of PRs to introduce a
ProseMirror-based
WYSIWYM editor experience
alongside our current textarea Markdown editor.

Behind a hidden site setting, this PR adds a toggle to the composer
toolbar, allowing users to switch between the two options.

Our implementation builds upon the excellent ProseMirror and its
non-core Markdown
module, using the
module's schema, parsing, and serialization definitions as the base for
further Discourse-specific features.

An extension API is included to enable further customizations.

The necessary extensions to support all Discourse's core and core
plugins features **will be implemented in subsequent PRs**.

---------

Co-authored-by: David Taylor <david@taylorhq.com>
This commit is contained in:
Renato Atilio
2025-02-04 14:37:18 -03:00
committed by GitHub
parent 6d6e9c174d
commit 0e61565b2b
49 changed files with 3200 additions and 130 deletions

View File

@ -31,6 +31,7 @@ def write_config(package_dir, extras: {})
"module" => "esnext",
"moduleResolution" => "bundler",
"experimentalDecorators" => true,
"allowJs" => true,
"paths" => {
**namespaces
.map { |ns, paths| [ns, paths.map { |p| "#{relative(package_dir, p)}/*" }] }