[wp-trac] [WordPress Trac] #31263: Enter in wp-view forces paragraph tag.

WordPress Trac noreply at wordpress.org
Tue Feb 10 03:42:27 UTC 2015


#31263: Enter in wp-view forces paragraph tag.
--------------------------+------------------------------
 Reporter:  programmin    |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  TinyMCE       |     Version:  3.9
 Severity:  normal        |  Resolution:
 Keywords:  close         |     Focuses:  ui, javascript
--------------------------+------------------------------

Comment (by programmin):

 Why don't you do what the TinyMCE-lists plugin itself does?


 {{{

                 function createNewTextBlock(contentNode, blockName) {
                         var node, textBlock, fragment =
 dom.createFragment(), hasContentNode;
                         var blockElements =
 editor.schema.getBlockElements();

                         if (editor.settings.forced_root_block) {
                                 blockName = blockName ||
 editor.settings.forced_root_block;
                         }

                         if (blockName) {
                                 textBlock = dom.create(blockName);
                           ...

 }}}

 instead of dom.create('p')?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31263#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list