Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Is there any way to get a style in the rich text editor to wrap multiple lines?
I'm trying to wrap a heading and paragraph in a div (with a specific class), but when I select the style it wraps each row independently.
So what I want is this:
<div class="myclass"><h2>title</h2><p>some text</p></div>
But I actually get this:
<div class="myclass"><h2>title</h2></div><div class="myclass"><p>some text</p></div>
I think this is because of the way that TinyMCE sees these elements, as it either sees them as block elements, or inline elements when applying styles, and since both H2 and P elements are seen as block elements it wrap each one in its own block for this class.
TinyMCE is not a html editor, so it will probably not always do as you want it to do, this is one of the compromises you make with having a visual editor for your html = its easier to do for non technical uses, but it doesn't always do what you want it to technically.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted