joomlatinymcejoomla-articlejoomla-content-editor

How to prevent the TinyMCE (JCE) plugin from cleaning up my code?


I am using JCE, and I've set everything about code cleanup (in configuration) to OFF. The editor is fixing it anyway. Here's an example:

<span class="inset-right">
    <h3>TOC</h3>
    <ol>
        <li><a href="#wstep">Wstęp</a></li>
        <li><a href="#jak_zaczac">Jak zacząć?</a></li>
        <li><a href="#spis_metod">Spis metod</a></li>
    </ol>
</span>

Will get changed to:

<h3>TOC</h3>
<ol>
    <li><a href="#one">One</a></li>
    <li><a href="#two">Two</a></li>
    <li><a href="#three">Three</a></li>
</ol>

I know it is inappropriate to put <h3> and <ol> inside of a <span> tag, but I do not have a choice here. I just want to turn off all of the code fixing and cleanup.


Solution

  • Your code is invalid. Change span to div and all should be fine....

    <div class="inset-right">
        <h3>TOC</h3>
        <ol>
            <li><a href="#wstep">Wstęp</a></li>
            <li><a href="#jak_zaczac">Jak zacząć?</a></li>
            <li><a href="#spis_metod">Spis metod</a></li>
        </ol>
    </div>
    

    Then it should work...

    http://forum.joomla.org/viewtopic.php?p=2608692 has more information about modifying JCE for your code.