[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:28:04 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 | Resolution:
Keywords: has-patch dev-feedback | Focuses:
------------------------------------+---------------------
Changes (by danielbachhuber):
* keywords: has-patch => has-patch dev-feedback
Comment:
To test `44617.1.diff`:
1. Revert https://github.com/WordPress/gutenberg/pull/2708 locally
(probably on a test branch).
2. Create a post in the Classic Editor with the following:
{{{
<!-- wp:shortcode -->
[column]
I daresay that Fry has discovered the smelliest object in the known
universe! For the last time, I don't like lilacs! Your 'first' wife was
the one who liked lilacs! No argument here. A true inspiration for the
children.
[/column]
<!-- /wp:shortcode -->
<!-- wp:paragraph -->
<p>It has a normal paragraph block</p>
<!-- /wp:paragraph -->
<!-- wp:shortcode -->
[my-awesome-shortcode]
<!-- /wp:shortcode -->
}}}
3. Apply the `44617.1.diff` patch, run `grunt build`, switch to the Visual
editor, and force refresh.
4. Switch back to the Text editor and observe the following:
{{{
<!-- wp:shortcode -->[column] I daresay that Fry has discovered the
smelliest object in the known universe! For the last time, I don't like
lilacs! Your 'first' wife was the one who liked lilacs! No argument here.
A true inspiration for the children. [/column]<!-- /wp:shortcode -->
<!-- wp:paragraph --><p>It has a normal paragraph block</p><!--
/wp:paragraph -->
<!-- wp:shortcode -->[my-awesome-shortcode]<!-- /wp:shortcode -->
}}}
You'll note newlines are stripped, which I'm undecided as to whether is
still a bug. At the very least, the paragraph tags in the Paragraph Block
persist, and no paragraph tags are applied to the Shortcode Blocks.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44617#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list