You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HTML-tags of newly registered formats disappear when pasting #13292
Describe the bug
I registered a new format type. Lets say: <span class="great-class">. When I copy a text now into the Component, the span.great-class tags get removed:
I suspect, this could be fixed by expanding the list returned by getPhrasingContentSchema() with the types we get from wp.data.select('core/rich-text').getFormatTypes()
Activity
websupporter commentedon Jan 11, 2019
I suspect, this could be fixed by expanding the list returned by
getPhrasingContentSchema()with the types we get fromwp.data.select('core/rich-text').getFormatTypes()gutenberg/packages/blocks/src/api/raw-handling/phrasing-content.js
Line 35 in a92216b
But for
<span>this might be also a problem:gutenberg/packages/blocks/src/api/raw-handling/phrasing-content-reducer.js
Lines 16 to 40 in a92216b
skorasaurus commentedon Mar 28, 2024
Thanks for reporting; I'm not able to reproduce this using your example; nor in my custom example of a custom richtext format.
Looks like this was fixed a while back in #27967 (ref #16240)
websupporter commentedon Mar 29, 2024
Amazing. Thanks for following up @skorasaurus