Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @galbaras. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +23 B (0%) Total Size: 1.72 MB
ℹ️ View Unchanged
|
| exports[`Blocks raw handling should correctly handle quotes with mixed content 1`] = ` | ||
| "<!-- wp:quote --> | ||
| <blockquote class="wp-block-quote"><!-- wp:heading {"level":1} --> | ||
| <blockquote class="wp-block-quote"><!-- wp:heading {"level":1,"className":"wp-block-heading"} --> |
There was a problem hiding this comment.
Not sure why you'd ever have content to convert that has such a class, but this is the test 🤷♀️
const filtered = serialize(
pasteHandler( {
HTML: '<blockquote><h1 class="wp-block-heading">chicken</h1><p>ribs</p></blockquote>',
mode: 'AUTO',
} )
); |
Thank you for adding class handling, @ellatrix. It would be good to add handling for id, even if only for the sake of completion, but possibly for actual value. It would also be good to confirm that classes and IDs aren't stripped from (inline) elements within block-level ones, e.g. span or a tags within paragraphs, list items, blockquotes, etc. BTW, I've linked my GitHub profile to wp.org. |
|
@galbaras In that case, could you create a new issue? |
|
Testing shows that inline elements are handled OK for |
Unlinked contributors: galbaras. Co-authored-by: ellatrix <ellatrix@git.wordpress.org> Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: ndiego <ndiego@git.wordpress.org>
What?
Adds a filter to add custom class names to block attributes when converting to blocks (from classic, not paste).
To do: if conceptually approved, add small integration test.Why?
Fixes #42172.
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast