Skip to content

Shortcodes in TinyMCE - #4292

Draft
PeterNerlich wants to merge 26 commits into
developfrom
feature/shortcodes-tinymce
Draft

Shortcodes in TinyMCE#4292
PeterNerlich wants to merge 26 commits into
developfrom
feature/shortcodes-tinymce

Conversation

@PeterNerlich

@PeterNerlich PeterNerlich commented May 13, 2026

Copy link
Copy Markdown
Contributor

Until this feature is ready to be released, any work on it is to be done in / merged into feature/shortcodes-tinymce

The decision has been made to test shortcodes itself without special handling in javascript, by delivering the rendered HTML to TinyMCE and detecting any internal links in submitted content and substituting them with the equivalent shortcode. This PR exists only for reference / in case this is picked up again later, after Shortcodes themselves have proved valuable.

Short description

This Draft PR captures the early state of development on making Shortcodes accessible in the TinyMCE editor. As I expect that this will accumulate a lot of discussion over the next sprints, the actual merge into develop will likely be done by a separate PR once the feature is complete and polished.

feature/shortcodes-tinymce is intended as a long living feature branch, with additions and bugfixes being merged into it instead of using develop to incrementally improve the feature. Some bugs and loose ends are already known, many more are expected.

Before that still, the commit history is subject to major cleanup operations.

Proposed changes

TODO

Known bugs

  • Inserting/editing shortcodes has weird side effects with line breaks / order of items / nested <div>s in nested <div>s in nested <div>s in…
  • Non-empty Shortcode arguments that do not contain spaces should not be rendered surrounded by double quotes (") but sometimes are
  • Trailing empty Shortcode arguments should be omitted when optional

Side effects

Faithfulness to issue description and design

There was no design, the architecture was developed as-you-go. Visual UI is mostly aimed to be kept indistinguishable.

  • External links and linking a page (and other types in the future) is now separate. Whether that will stay as it is now is up for debate.

How to test

Resolved issues

Fixes: #4289


Pull Request Review Guidelines

Comment thread integreat_cms/static/src/js/tinymce-plugins/shortcodes/utils.ts Dismissed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task]: Shortcodes in TinyMCE

2 participants