We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25847
    • 62 Posts
    I am having a rather annoying problem with tinyMCE when I edit my pages.

    Let’s say I enter the following xhtml source with tinyMCE turned off:

    <div id="supporting-text">
    <div id="paragraph">
    <h4>Contact</h4>
    <p class="p2">
    Aenean nisi. Donec id mauris. Mauris quis arcu. Nam quis tellus vitae  justo aliquet pulvinar. Sed vel odio. Phasellus suscipit. Nam a purus  at tellus porttitor lacinia. Cras quis felis ac lectus hendrerit  consequat. Nullam a neque nec sapien ultrices scelerisque. Mauris  risus. Aliquam vel urna nec tortor fermentum iaculis. In leo dolor,  rhoncus at, eleifend nec, auctor non, sapien. Donec mauris turpis,  consequat sit amet, condimentum nec, condimentum sit amet, odio. Fusce  dolor. Donec elit tortor, elementum vel, nonummy at, tempor a, lectus.  Donec imperdiet consequat eros. Pellentesque consectetuer ligula non  velit. Nulla porta tellus in purus. Vivamus augue nisi, dignissim eu,  commodo ut, aliquam eget, dolor. 
    </p>
    </div>
    


    When I turn tinyMCE back on, it automatically inserts an extra end div (</div>) tag to the end of my xhtml code as follows (between the arrows):

    <div id="supporting-text">
    <div id="paragraph">
    <h4>Contact</h4>
    <p class="p2">
    Aenean nisi. Donec id mauris. Mauris quis arcu. Nam quis tellus vitae  justo aliquet pulvinar. Sed vel odio. Phasellus suscipit. Nam a purus  at tellus porttitor lacinia. Cras quis felis ac lectus hendrerit  consequat. Nullam a neque nec sapien ultrices scelerisque. Mauris  risus. Aliquam vel urna nec tortor fermentum iaculis. In leo dolor,  rhoncus at, eleifend nec, auctor non, sapien. Donec mauris turpis,  consequat sit amet, condimentum nec, condimentum sit amet, odio. Fusce  dolor. Donec elit tortor, elementum vel, nonummy at, tempor a, lectus.  Donec imperdiet consequat eros. Pellentesque consectetuer ligula non  velit. Nulla porta tellus in purus. Vivamus augue nisi, dignissim eu,  commodo ut, aliquam eget, dolor. 
    </p>
    </div>   ----------->  </div>  <-------------   


    tinyMCE is doing this every single time I edit a page, no matter what page I am using and what template I am using for the page.

    Is anyone else experiencing this same problem? Is there any particular reason that tinyMCE is doing this every time? I am getting kind of tired of having to delete an extra </div> tag every time I edit a page. If I were to turn this site over to a client with limited or no html knowledge, it would mess up every single page every time they decided to edit something! I can’t have that happening! Any ideas?
      • 25663 MODX Staff
      • 12,272 Posts
      It’s closing one of the two DIV tags at the top. You have only one closing div currently for #supporting-text and for #paragraphy.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me