Skip to content

[16.0][ADD] web_widget_markdown_editor - #3817

Open
ygol wants to merge 2 commits into
OCA:16.0from
ygol:16.0-add-web_widget_markdown_editor
Open

ygol wants to merge 2 commits into
OCA:16.0from
ygol:16.0-add-web_widget_markdown_editor

Conversation

@ygol

@ygol ygol commented Nov 20, 2026 •

Copy link
Copy Markdown

Module

web_widget_markdown_editor: a markdown widget for text fields, based on
Toast UI Editor 3.2.2 (MIT, maintained).

  • Markdown (default) and WYSIWYG editing modes, with preview
  • Options: height, minimum height, initial mode, hiding the mode switch, placeholder,
    language
  • Read-only fields are rendered by the Toast UI viewer
  • The field stores the raw Markdown text. The widget is not offered on html fields,
    because Odoo sanitizes them on save.
  • Demo data: Settings > Users & Companies > Groups > "Markdown widget demo", tab Notes

Proposed as Alpha.

This PR first also held web_editor_paste_markdown, which used the Toast UI copy of
this widget. That module now ships its own libraries and is proposed on its own in
#3820; the two modules are independent.

Why a new module

web_widget_text_markdown stops at 15.0 (the 18.0 migration, #3381, is a draft). It
relies on bootstrap-markdown, which is no longer maintained. Toast UI Editor is
maintained and offers a WYSIWYG mode.

Origin and third-party code

  • Written by Yves Goldberg (Ygol InternetWork) in December 2025 and used in production
    since then. No code comes from other Odoo modules.
  • static/src/lib holds Toast UI Editor 3.2.2, (c) NHN Cloud Corp., MIT license
    (static/src/lib/LICENSE). The files are byte-identical to the official build at
    https://uicdn.toast.com/editor/3.2.2/.

AI assistance

Following the OCA AI policy, the commits carry Assisted-by: trailers: Claude Code
(Claude Opus 5.5) for the widget, the tests and the OCA packaging. I reviewed and
tested this code, and I take responsibility for every line.

Tests

QUnit suite run by tests/test_js.py (HttpCase.browser_js): read-only rendering,
save of the edited Markdown, Markdown mode by default with the mode tabs visible, text
fields only. The suite neutralizes web_m2x_options' form controller step, which reads
a session the test environment does not have.

@OCA-git-bot OCA-git-bot added series:16.0 mod:web_editor_paste_markdown Module web_editor_paste_markdown mod:web_widget_markdown_editor Module web_widget_markdown_editor labels Nov 20, 2026
ygol added 2 commits November 22, 2026 10:08
New `markdown` field widget for text fields, based on Toast UI
Editor: Markdown (default) and WYSIWYG modes, toolbar, height, placeholder
options, read-only rendering by the Toast UI viewer. Demo on a user group.
QUnit tests included.

Origin: written by Yves Goldberg (Ygol InternetWork) in December 2025 for
the Ygol InternetWork Odoo instance. No code taken from other Odoo modules
(web_widget_text_markdown uses different libraries: bootstrap-markdown,
showdown, marked).

Third-party code: Toast UI Editor 3.2.2 (c) NHN Cloud Corp., MIT license,
in static/src/lib, byte-identical to https://uicdn.toast.com/editor/3.2.2/.

Assisted-by: Claude Code:claude-opus-5-5
web_m2x_options, from the same repository, adds a step to every form view
load that reads its settings from a session the QUnit environment does not
have. The tests neutralize that step: it only concerns x2many fields.

Assisted-by: Claude Code:claude-opus-5-5
@ygol
ygol force-pushed the 16.0-add-web_widget_markdown_editor branch from 4ae5ac8 to 2c1c004 Compare November 22, 2026 08:12
@OCA-git-bot OCA-git-bot removed the mod:web_editor_paste_markdown Module web_editor_paste_markdown label Nov 22, 2026
@ygol ygol changed the title [16.0][ADD] web_widget_markdown_editor, web_editor_paste_markdown [16.0][ADD] web_widget_markdown_editor Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:web_widget_markdown_editor Module web_widget_markdown_editor series:16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants