Title: TinyMCE stripping code
Last modified: August 20, 2016

---

# TinyMCE stripping code

 *  [brenus](https://wordpress.org/support/users/brenus/)
 * (@brenus)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/tinymce-stripping-code/)
 * Who’s the [imagine worst expletive and derogatory comment here] that created 
   TinyMCE and decided to make it standard for WordPress? Why would anyone want 
   code automatically stripped out of their posts? I’ve read several accounts dating
   back 4 years in the forums and still, is anyone overseeing this stupidity?
 * I installed TinyMCE Valid Elements, and added “a” as an element. Or is it an 
   attribute? Who the hell knows since the directions say “Go to Manage -> TinyMCE
   Valid Elements and add some elements and attributes.” without ANY EXAMPLE WHATSOEVER!!!!
   No screencap, no example, no video direction. Well done, developers!
 * . Can’t go anywhere with that, can I? Typed it directly into html mode. Saved.
   Stripped it out. I finally had to go into the profile and check “Disable the 
   visual editor when writing” in order to complete my post. That’s absurd. Anyone
   have a solution?
 * Because of this I’ve tested the foliopress and ckeditor for wordpress, both with
   some positives but neither improve on the native “add images” and duplication
   is confusing. But I’m still trying to figure out a solution because my techno-
   phobic clients aren’t going to put up with the editor stripping valid html from
   posts. They’ll get confused over WordPress vs. editor image imports. Basically,
   I want TinyMCE’s nonsense to stop. Thoughts?

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [Jonas Grumby](https://wordpress.org/support/users/ss_minnow/)
 * (@ss_minnow)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/tinymce-stripping-code/#post-2477991)
 * > Why would anyone want code automatically stripped out of their posts?
 * One of the conventions of web 2.0 is to keep the code simple so you can easily
   switch themes, supply rss feeds etc. without the code causing formatting problems.
 *  [kmessinger](https://wordpress.org/support/users/kmessinger/)
 * (@kmessinger)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/tinymce-stripping-code/#post-2478037)
 * [http://www.tinymce.com/wiki.php/%22For_Dummies%22](http://www.tinymce.com/wiki.php/%22For_Dummies%22)
   and check the FAQ.
 *  Thread Starter [brenus](https://wordpress.org/support/users/brenus/)
 * (@brenus)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/tinymce-stripping-code/#post-2478195)
 * Sorry but that doesn’t fly. I express an actual problem, not just with software
   but documentation and the first response is “that’s the way it is” and the second
   is “Read The F-ing Manual” or “why don’t you just rebuild the software yourself.”
   That’s not good enough. Not to explain why TinyMCE stripped a text link when 
   I used its own button.
 *  [kmessinger](https://wordpress.org/support/users/kmessinger/)
 * (@kmessinger)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/tinymce-stripping-code/#post-2478234)
 * > “Read The F-ing Manual”
 * I did not say read the manual but in retrospect maybe you should.
 * > I express an actual problem, not just with software but **documentation**
 * I referred you to the FAQ which says (since you don’t want to read it). . .
 * > You need to check out the valid_elements and extended_valid_elements option
   > in the configuration. By default, TinyMCE only allows certain tags and attributes.
   > TinyMCE also tries to follow the XHTML specification as much as possible, this
   > can cause some unexpected source changes, there are however configuration options
   > to battle this issue, study the configuration options in details.
 * > Thoughts?
 * What you asked for and what you got.
 *  [jmanshreck](https://wordpress.org/support/users/jmanshreck/)
 * (@jmanshreck)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/tinymce-stripping-code/#post-2478339)
 * Where can find valid_elements && extended_valid_elements option? Here is my problem….
   I created a custom theme (static) website with a ton of custom markup for a client.
   I developed the entire site in HTML mode. Now I just handed it over to the client
   and they made a change from within visual mode (because the thought of markup
   scares them). I originally developed this site in WP because I read such great
   reviews about user friendly etc ….. however, I did not know it would strip out
   all of my markup when other people (clients) make modifications. They are going
   to want to go in and make more changes soon. How can I fix this??? This is a 
   huge problem for me right now and I need some serious help. I’m running 3.3.
 *  Thread Starter [brenus](https://wordpress.org/support/users/brenus/)
 * (@brenus)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/tinymce-stripping-code/#post-2478340)
 * I feel your pain. And this is my point to the obstructionists who won’t question
   a retarded feature and would rather tell you to spend your days developing work-
   arounds rather than address the apparent problem: TinyMCE can’t validate its 
   own code. It’s afraid of div tags blowing up the site or something. We still 
   should be allowed to turn off its stripping features.
 * What I did was install two plugins – TinyMCE Valid Elements and Ultimate TinyMCE.
   The first is probably all you need but better safe than sorry. Just download 
   and install from the plugins page.
 * Then you’ll find TinyMCE Valid Elements options, not under the plugin or settings,
   where it should be, but under TOOLS. Add an element like “A” for a link, then
   you can add attributes. Then the code won’t be stripped. Presumably. I’ve still
   had problems, but I’m told the “documentation” will help us.
 *  [jmanshreck](https://wordpress.org/support/users/jmanshreck/)
 * (@jmanshreck)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/tinymce-stripping-code/#post-2478341)
 * Thanks for the info. What version of WP are you running with TinyMCE Valid Elements?
   The documentation says it’s compatible up to 2.7.1.
    I’m running 3.3. Will it
   work for me? This is a huge problem in WP .. but It looks like other CMS have
   similar problems. It also looks like “other CMS” deal with it better. Can’t WP
   just implement a “turn safe mode off” option to stop TinyMCE from stripping html
   out? Read this: [http://dijoomla.blogspot.com/2009/02/turn-off-tinymce-cleanup-code.html](http://dijoomla.blogspot.com/2009/02/turn-off-tinymce-cleanup-code.html)
 *  [jmanshreck](https://wordpress.org/support/users/jmanshreck/)
 * (@jmanshreck)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/tinymce-stripping-code/#post-2478344)
 * BTW ….. I am using div tags and that plugin doesn’t give me options to add attributes
   to the div tags. So now what is happening is almost as bad ….
    I’ve added div
   to the list of valid elements.
 * I go into “Visual” make some changes, then cringe as I go back into HTML because
   I never know what will happen ….
    Good news is the div elements are still there,
   but my class=”left-column” is gone, leaving me with only an empty div tag. It’s
   useless! Anyone having this similar problem?
 *  [devstorm](https://wordpress.org/support/users/devstorm/)
 * (@devstorm)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/tinymce-stripping-code/#post-2478346)
 * This is a show-stopper for me and my clients, too.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘TinyMCE stripping code’ is closed to new replies.

## Tags

 * [tinymce](https://wordpress.org/support/topic-tag/tinymce/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 5 participants
 * Last reply from: [devstorm](https://wordpress.org/support/users/devstorm/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/tinymce-stripping-code/#post-2478346)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
