This is the behavior in WordPress, and is the expected one. In the editor shortcodes are “just text” that acts as a placeholder.
If you want to add a single shortcode on its own line, you will have to take care of the paragraph that is added with it. Generally you may want to add a shortcode as part of the element(s) you need, not separately. I.e. if you are adding [shcode]<div>...</div>, you are better off with <div>[shcode]...</div>.
Thread Starter
ashf
(@ashf)
I often use something like this
[columns]
aaa
bbb
ccc
[/columns][columns]
111
222
333
[/columns]
Is there best way to handle this?
Thread Starter
ashf
(@ashf)
This is a solution I found.
add_filter('content_save_pre','shortcode_unautop',10,1);
But it would be nice if TinyMCE Advanced had ability to prevent shortcode being added p tag.