• How would I write content with the shortcodes or how can I prevent this editor to add unwanted tags when my client switches between text editor and visual editor?

    What I put into text editor looks like this:

    [div id="something"]<h4>Some title here</h4> 
    ... more content.... 
    [end-div]

    It produces this in my source code:

    <div id="handelsplan-definition"></p>
    <h4>Was ist ein Handelsplan?</h4>....

    It doesn´t matter if I put the shortcodes and the titles side by side or under each other. In case of titles, it´s </p>, in other cases it´s <br /> which at least doesn´t throw validation errors. Any solution for this?

Viewing 1 replies (of 1 total)
  • Thread Starter SiGa

    (@siga)

    Wanted to add that I´m experimenting with this now:
    https://gist.github.com/ninnypants/1668216

    Made it a label so I can apply it to certain pages and removed the br from the code (need it in CF7 forms and doesn´t do no harm).

    That seems to work so far (removed all the empty closing p tags) but I will need to test if it doesn´t conflict with any other plugin. If somebody got a better idea, please let me know.

    • This reply was modified 8 years, 9 months ago by SiGa.
Viewing 1 replies (of 1 total)

The topic ‘Empty tags’ is closed to new replies.