-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Rich Text: Unrelated attributes are applied to Rich Text FormatType #14858
Labels
[Package] Rich text
/packages/rich-text
Comments
youknowriad
added
[Feature] Rich Text
Related to the Rich Text component that allows developers to render a contenteditable
[Feature] Writing Flow
Block selection, navigation, splitting, merging, deletion...
and removed
[Feature] Writing Flow
Block selection, navigation, splitting, merging, deletion...
labels
Apr 18, 2019
cc @ellatrix in case you have more info here. |
@technote-space Thanks! Would you be able to make a PR with the suggested code change and perhaps a test case? |
ellatrix
added
[Package] Rich text
/packages/rich-text
and removed
[Feature] Rich Text
Related to the Rich Text component that allows developers to render a contenteditable
labels
Apr 19, 2019
5 tasks
I created PR #15070 |
ellatrix
pushed a commit
that referenced
this issue
Apr 24, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
There is an error in the program, which causes strange behavior as described in the title.
To reproduce
tagName: span, className: my-span
(hereinafter referred to format type A)e.g. install and activate
Advanced Rich Text Tools for Gutenberg
pluginhttps://wordpress.org/plugins/advanced-rich-text-tools/
(e.g. background color)
(hereinafter referred to format type B)
⇒ the attributes that format type B had is applied to format type A
(the attributes are not applied on the front end or after reloading editor)
Expected behavior
Unrelated attributes should not be applied.
Screenshots
Desktop (please complete the following information):
Additional context
https://github.com/WordPress/gutenberg/blob/release/5.4/packages/rich-text/src/to-dom.js#L212
I think that it should be changed as shown below.
I tried the above changes locally and confirmed that they worked correctly.
The text was updated successfully, but these errors were encountered: