[wp-trac] [WordPress Trac] #44617: Introduce new 'hasBlock' behavior for TinyMCE 'BeforeSetContent' and 'SaveContent' events
WordPress Trac
noreply at wordpress.org
Fri Jul 20 13:21:23 UTC 2018
#44617: Introduce new 'hasBlock' behavior for TinyMCE 'BeforeSetContent' and
'SaveContent' events
-----------------------------+-----------------------
Reporter: danielbachhuber | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.9.8
Component: Editor | Version:
Severity: normal | Keywords: has-patch
Focuses: |
-----------------------------+-----------------------
When TinyMCE editor content has Gutenberg blocks in it, we can assume
`<p>` paragraph tags are included too. In this scenario,
`wp.editor.autop()` should not be applied to the content.
However, even when `wp.editor.autop()` isn't applied, TinyMCE applies
`<p>` paragraph tags to all root nodes (e.g. the content of Shortcode
Blocks). We can mitigate this behavior by stripping `<p>` paragraph tags
from Shortcode Blocks on the 'SaveContent' event.
From [https://github.com/WordPress/gutenberg/issues/4672
wordpress/gutenberg#4672]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44617>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list