Wrap Blocks With Div Instead Of P Please?
-
I’m loving the plugin for building new solutions for ourselves and our customers, but am running into an HTML5 limitation with the way the plugin wraps all blocks with <p> tags instead of <div> in the markup.
We use the plugin to stylize our LaunchFlows shortcode output. Even though we use object cachine to spit out serialized html, all modern browsers will reject any html from our plugin (or any plugin for that matter) that we attempt to put into an editor plus modified block if that markup is anything other than pure text or a span.
This is because there are almost no elements that can be children of a p tag… so you’ve kind of created a limit on use of your plugin that does not need to exist, frustrating some clever uses for anyone who wants to execute code into blocks with shortcodes.
As a result, when one attempts to use a shortcode block or paragraph block with Editor Plus, any content that has for example an unordered list ul or other div will be spit out at the bottom of the stylized block markup by the browser.
See reference as to why here (most elements cannot be children of a p tag): https://html.spec.whatwg.org/multipage/grouping-content.html#the-p-element
As such, could you please provide an option by way of a setting, filter or otherwise where we could have Editor plus wrap each block with a div instead of a p tag?
thanks!
spence
- The topic ‘Wrap Blocks With Div Instead Of P Please?’ is closed to new replies.