Problem with tinymce and list-items
Asked Answered
M

1

10

I am having a problem with using the bbcodeplugin and list-items. While the lists are being safed as bbcode as i want it, when reopening and editing the text, tinymce adds additional markup to lists, so that something like

<ul>
<li>one</li>
</ul> 

becomes

<ul>
<ul><li>one</li></ul>
</ul>

So each <li> item is being wrapped with an additional <ul> which I would like to prevent.

How could I possibly exclude all list-items from being modified by the tinymce-javascript?


This issue seems related to the "tinymce adding BR when inserting code" thing, which I now saw several times during my research. because not only the ul tags are added by tinymce, but also br's.

Please, can someone give me any hint?

Martens answered 23/5, 2011 at 11:24 Comment(3)
Haha, great - finally i found the solution for this issue, a simple oneliner, to be added into the tinymce-init: apply_source_formatting : false So this option set to false prevents tinymce to add such unwanted markup.Martens
apply_source_formatting just made harder to edit HTML directly but didn't solve the problemOxytocic
I have this problem too, and apply_source_formatting: false not workingRowel
A
0

You should add the parameter on init.

apply_source_formatting : false

This will prevent any preformatting of the source.

Afterguard answered 30/3, 2014 at 6:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.