Could you please post some sample code that illustrates the problem? I can’t seem to reproduce the issue – when I save a page, WP does not add a new line after the [/raw] tag.
Edit: Also, Raw HTML currently does not support running shortcodes inside [raw]…[/raw] tags. This is because it’s designed to prevent WP from changing the tag content in any way, which also usually prevents WP from replacing a shortcode with new HTML code.
Here’s what I mean; ever seen this before?
If I input this into the html editor:
<div>
[raw]
<p>Some text.</p>
[/raw]<p><img class="alignnone size-full wp-image-258" ...
the first time I save it, it becomes this:
<div>
[raw]
<p>Some text.</p>
[/raw]
<p><img class="alignnone size-full wp-image-258" ...
and when I save it again it becomes:
<div>
[raw]
<p>Some text.</p>
[/raw]</p>
<p><img class="alignnone size-full wp-image-258" ...
I should also say that I use the TinyMCE Advanced plugin and take advantage of its “Stop removing the <p>
and <br />
tags when saving and show them in the Text editor” feature.
I have tried this with and without disabling wpautop.
This doesn’t only happen with your plugin; it happens whenever I try to insert a shortcode that uses opening and closing tags.
I know this is not the fault of your plugin; I’m just wondering if you have any guesses about what might be causing it?
Thanks for any advice you might provide!
I should also say that I use the TinyMCE Advanced plugin and take advantage of its “Stop removing the <p> and
tags when saving and show them in the Text editor” feature.
That’s probably it. This plugin has only been tested with the default post editor. Currently it does not support any other editors.
Each editor has its own quirks. I wasn’t able to reproduce the issue using the built-in editor (even with your sample code), but it’s unsurprising that another editor might have different edge cases.