FEATURE: add footnote (plugin) rich editor extension (#31719)

Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds a `footnote` node, parser, `^[inline]` input rule, toolbar button
item, and serializer.

Also adds a NodeView with an internal ProseMirror editor to edit the
footnote content.
This commit is contained in:
Renato Atilio
2025-04-14 14:25:36 -03:00
committed by GitHub
parent a0a5b2889f
commit 29ca0ae0b1
14 changed files with 453 additions and 43 deletions

View File

@ -23,10 +23,9 @@ describe "Composer - ProseMirror editor - Local Dates extension", type: :system
open_composer_and_toggle_rich_editor
rich.click
cdp.write_clipboard <<~MARKDOWN
cdp.copy_paste <<~MARKDOWN
[date=2022-12-15 time=14:19:00 timezone="Asia/Singapore"]
MARKDOWN
page.send_keys([SystemHelpers::PLATFORM_KEY_MODIFIER, "v"])
expect(rich).to have_css(
"span.discourse-local-date[data-timezone='Asia/Singapore']",
@ -39,10 +38,9 @@ describe "Composer - ProseMirror editor - Local Dates extension", type: :system
open_composer_and_toggle_rich_editor
rich.click
cdp.write_clipboard <<~MARKDOWN
cdp.copy_paste <<~MARKDOWN
[date-range from=2022-12-15T14:19:00 to=2022-12-16T15:20:00 timezone="Asia/Singapore"]
MARKDOWN
page.send_keys([SystemHelpers::PLATFORM_KEY_MODIFIER, "v"])
expect(rich).to have_css("span.discourse-local-date-range")
expect(rich).to have_css(