<![CDATA[ [SOLVED] TinyMCE is removing DIVS from the code - My Forums]]> https://forums.modx.com/thread/?thread=45718 <![CDATA[Re: [SOLVED] TinyMCE is removing DIVS from the code]]> https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code?page=2#dis-post-483694 I tried the setting above
extended_valid_elements : "div[*]"
extended_valid_elements:"div[id|class|title]"

My template looks like this:
<div class="subcolumns">
  <div class="c50l">
    <div class="subcl">
      <p>left content</p>
    </div>
  </div>
  <div class="c50r">
    <div class="subcr">
      <p>right content</p>
    </div>
  </div>
</div>

The template shows up in tinymce, the preview looks ok, but after include and inspect the source code everything inside the .subcolumns div is removed. Any ideas?
MODX 2.2.10
tinymce 4.3.0-pl
regards
manu
]]>
manu37 Nov 22, 2013, 11:48 AM https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code?page=2#dis-post-483694
<![CDATA[Re: [SOLVED] TinyMCE is removing DIVS from the code]]> https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code?page=2#dis-post-421063
Quote from: modx_fan at Jan 25, 2011, 09:41 AM

What settings should i change to make sure TinyMCE doesn't format my HTML at all

Add the following to your Custom parameters

apply_source_formatting:0


Quote from: okneb at Apr 01, 2010, 08:58 AM

TinyMCE removes empty divs by default, it can be fixed by adding:
extended_valid_elements : "div[*]"

to the configuration.

This code doesnt work for me, but after researching the TinyMice forum I found my solution:

extended_valid_elements:"div[id|class|title]"
]]>
iusemodx Apr 21, 2012, 05:30 PM https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code?page=2#dis-post-421063
<![CDATA[Re: [SOLVED] TinyMCE is removing DIVS from the code]]> https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code?page=2#dis-post-264536
I can’t figure out what file to edit.]]>
signcarver Feb 17, 2011, 07:01 PM https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code?page=2#dis-post-264536
<![CDATA[Re: [SOLVED] TinyMCE is removing DIVS from the code]]> https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code?page=2#dis-post-264535
What settings should i change to make sure TinyMCE doesn’t format my HTML at all, for example it always moves </div> (no matching starting tag because it’s placed outside [[*content]] area) to the bottom of the page. I thought changing "cleanup" property to False would disable formatting, but doesn’t seem to work.

]]>
modx_fan Jan 25, 2011, 03:41 AM https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code?page=2#dis-post-264535
<![CDATA[Re: [SOLVED] TinyMCE is removing DIVS from the code]]> https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code?page=2#dis-post-264534 add it to Custom Parameters]]> sottwell Jan 25, 2011, 01:36 AM https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code?page=2#dis-post-264534 <![CDATA[Re: [SOLVED] TinyMCE is removing DIVS from the code]]> https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code?page=2#dis-post-264533
i’m having the same problem, all empty divs are removed when i click "Toggle Editor". I’m using Modx Rev 2.07 and TinyMCE 4.1.2. I added extended_valid_elements : "div[*]" to assets/components/tinymce/xconfig.js, didn’t change anything. Then i tried to edit TinyMCE plugin properties : plugins->TinyMCE->Properties but can’t find "valid_elements" property. Can anyone help with this problem?]]>
modx_fan Jan 25, 2011, 12:27 AM https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code?page=2#dis-post-264533
<![CDATA[Re: [SOLVED] TinyMCE is removing DIVS from the code]]> https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code?page=2#dis-post-264532 Quote from: okneb at Apr 01, 2010, 08:58 AM

TinyMCE removes empty divs by default, it can be fixed by adding:
extended_valid_elements : "div[*]"

to the configuration.

In modx go to Manage Elements > Plugins > TinyMCE > Configution
and add it to Custom Parameters.

Worked for me. Thanks! I like the idea of the chunk as well—particularly for using a styled horizontal rule in a div. That way it can be typed in the client if they want to add a rule.]]>
brianlarson Oct 20, 2010, 03:45 PM https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code?page=2#dis-post-264532
<![CDATA[Re: [SOLVED] TinyMCE is removing DIVS from the code]]> https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code#dis-post-264531
<pre>
<ul>
<li class="active"><a href="index.htm">Home</a></li>
<li><a href="news.htm">News</a></li>
</ul>
</pre>

But class="active" disappear.
I have tried to open xconfig.js and add this line
var tinymce_extended_valid_elements = "div[id|dir|class|align|style],span[id|dir|class|align|style],ul[id|dir|class|align|style],li[id|dir|class|align|style]";


But doesn’t change anything. I can’t use the "html" button because I need to show the code as it is. Does anyone know how to fix this issue?
]]>
microcipcip May 27, 2010, 06:57 AM https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code#dis-post-264531
<![CDATA[Re: [SOLVED] TinyMCE is removing DIVS from the code]]> https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code#dis-post-264530
extended_valid_elements : "div[*]"

to the configuration.

In modx go to Manage Elements > Plugins > TinyMCE > Configution
and add it to Custom Parameters.

]]>
okneb Apr 01, 2010, 03:58 AM https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code#dis-post-264530
<![CDATA[Re: [SOLVED] TinyMCE is removing DIVS from the code]]> https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code#dis-post-264529
<div id="fadeshow1"> </div>
]]>
mmjaeger Dec 11, 2009, 12:50 PM https://forums.modx.com/thread/45718/solved-tinymce-is-removing-divs-from-the-code#dis-post-264529