Page 1 of 1

[SOLVED] TinyMCE Eats HTML

Posted: Fri Mar 06, 2009 5:49 pm
by BenedictPorter
Hi Guys,

I've been using CMS Made Simple for a while now and have been dealing with this problem in one way or another but in the last few days it has driven me mad. I have searched the forums for an answer but I cannot seem to find a simple solution to what I believe must be a fairly common problem.

I need a simple way to stop the TinyMCE WYSIWYG eating the HTML code I paste into it. I've tried using the HTML view and the various paste options but to no avail. I know it's designed to strip out code in the name of validation but I need an effective way of a) turning that feature completely on and off or b) controlling what it strips out. I can't even paste a simple table into the HTML view without all the tags either being removed or duplicated in a bizarre way. I've noticed that it also does different things depending on whether you use FF or IE

Just to put this in context a lot of my work involves moving sites onto CMSMS and having to retype pages and pages of content is just a waste of time. It would be far more usfull to me if I could initially paste what I need to migrate and then go and clean it up as I see fit.

Currently using CMSMS 1.5.3 "Arecibo"

Please help...

Re: TinyMCE Eats HTML

Posted: Fri Mar 06, 2009 7:11 pm
by richart
There are two ways you can resolve this if I understand you correctly.

1. (tabs) Extensions > TinyMCE WYSIWYG > Advanced > uncheck "Force clean on paste:"

or

2.(tabs) My Preferences > User Preferences > select "none" under "Select WYSIWYG to use:"


Hope that helps.

Re: TinyMCE Eats HTML

Posted: Fri Mar 06, 2009 7:59 pm
by BenedictPorter
Thanks for the response.

I've tried both of those and neither worked for me. Interestingly, when I chose 'none' for Select WYSIWYG the formatting/html still gets stripped out.

Re: [SOLVED] TinyMCE Eats HTML

Posted: Wed Apr 22, 2009 10:01 am
by BenedictPorter
DOCTYPE!

That's all I'm gonna say on the matter... ;D

Re: [SOLVED] TinyMCE Eats HTML

Posted: Thu Apr 23, 2009 8:09 am
by ukmgranger
Can you be a little more specific on the solution.  I have this problem and it is driving me up the wall!

Re: [SOLVED] TinyMCE Eats HTML

Posted: Mon Apr 27, 2009 2:21 pm
by BenedictPorter
The first thing I did was to make sure that the DOCTYPE! I was using was correct. I had been using a STRICT doctype as that is what my IDE is set to produce when I start a new document.

Make sure you are using the TRANSITIONAL doctype for all your templates:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
This worked for me with most basic HTML when copying and pasting.

There are a few other things to try. Making use of the {embed} tag is recommended depending on what you want to achieve. Visit EXTENSIONS > TAGS in the CMS and click EMBED in the list to find out more.

My biggest frustration of late was trying to paste in or use iframes; google calendar is a good example of this. After some research I found a way to make TinyMCE accept the iframe tag in the HTML view.

Go to EXTENSIONS > TinyMCE WYSIWYG. Click on the ADVANCED tab and locate the box called EXTRA CONFIGURATION. In this box type the following code:

Code: Select all

extended_valid_elements : "iframe[marginheight|id|frameborder|scrolling|align|marginwidth|name|id|src|height|width|]"
This should let you paste or write iframes into the WYSIWYG without it stripping out all the useful stuff.

Hope all this helps.

Re: [SOLVED] TinyMCE Eats HTML

Posted: Fri Jun 26, 2009 9:37 am
by SUUD6501
sorry but where is the code ?
many thanks

Re: [SOLVED] TinyMCE Eats HTML

Posted: Mon Jun 29, 2009 9:28 am
by BenedictPorter
What code are you after?

Re: [SOLVED] TinyMCE Eats HTML

Posted: Mon Jun 29, 2009 10:37 am
by SUUD6501
HI,
I can't see the code in your post dated « Reply #5 on: 27 Apr 2009, 10:21 » written below "Go to EXTENSIONS > TinyMCE WYSIWYG. Click on the ADVANCED tab and locate the box called EXTRA CONFIGURATION. In this box type the following code:
" but I find it when I click on Post reply in topic summary.
It's fine. I get it:
extended_valid_elements : "iframe[marginheight|id|frameborder|scrolling|align|marginwidth|name|id|src|height|width|]"

many thanks for your quick answer

Re: [SOLVED] TinyMCE Eats HTML

Posted: Mon Jun 29, 2009 12:10 pm
by NaN
SUUD6501 wrote: I can't see the code in your post dated...
So please ban the IE from your System ;)