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?

Sathyajith Bhat
  • 21,321
  • 22
  • 95
  • 134
schmitty
  • 101
  • 1
  • 4
  • 4
    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. – schmitty May 23 '11 at 12:47
  • 1
    `apply_source_formatting` just made harder to edit HTML directly but didn't solve the problem – Petr Peller Jan 28 '14 at 15:58
  • I have this problem too, and `apply_source_formatting: false` not working – pylover Apr 21 '14 at 05:02

1 Answers1

0

You should add the parameter on init.

apply_source_formatting : false

This will prevent any preformatting of the source.

Philip G
  • 4,098
  • 2
  • 22
  • 41