Feature: Tiptap: Generic markup support#18124
Conversation
This is to add `class`, `id` and `data-*` attributes to any markup within Tiptap contents.
to support generic markup modifications.
to support generic markup modifications. Also modifies "umbEmbeddedMedia" to check explicitly for the `umb-embed-holder` class name. This is to differentiate from the generic `div` tag.
Previously this was a faux extension, but it is now real. This extension adds the core extensions for Umbraco RTE support. e.g. StarterKit, et al, and the new global attributes and generic elements.
iOvergaard
left a comment
There was a problem hiding this comment.
Looks promising. What about the style attribute, should we support that?
@iOvergaard Sounds good. 👍 |
|
@iOvergaard It appears to play nicely with the text-alignment extension. I was concerned that the Markup (in View Source Code modal) Not that I'd actively encourage inline CSS styles within the RTE, but the option is there. |
so that it can allow other (nested) `Mark` extensions.
iOvergaard
left a comment
There was a problem hiding this comment.
LGTM. I also agree that it should be considered a feature, although it technically resolves a bug. So I'll put the release label on this PR as well as on the related issue.


Description
Fixes #17832.
Adds support for generic markup tags (e.g.
divandspan) and global attributes (e.g.class,id, anddata-*).This PR introduces a "Rich Text Essentials" Tiptap extension, this was originally a fake extension to encapsulate the core Tiptap extensions required for use in Umbraco, but with the addition of the generic extensions, it has become real.
It has been developed in a backwards-compatible way, no breaking-changes.
How to test?
class,idordata-*attributes, and throw in a few<div>and<span>tags.Do keep in mind that Tiptap is a semantic rich-text editor and will evaluate the markup presented: e.g. it will not allow Block elements within Inline elements, e.g.
<span><div></div></span>; and attributes may be re-ordered alphabetically.