-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
div
andspan
) 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
,id
ordata-*
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.