[SOLVED] TinyMCE Eats HTML

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
BenedictPorter
Forum Members
Forum Members
Posts: 36
Joined: Fri Mar 06, 2009 5:33 pm

[SOLVED] TinyMCE Eats HTML

Post 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...
Last edited by BenedictPorter on Wed Apr 22, 2009 10:00 am, edited 1 time in total.
richart
Forum Members
Forum Members
Posts: 17
Joined: Wed Sep 03, 2008 4:12 pm

Re: TinyMCE Eats HTML

Post 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.
BenedictPorter
Forum Members
Forum Members
Posts: 36
Joined: Fri Mar 06, 2009 5:33 pm

Re: TinyMCE Eats HTML

Post 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.
BenedictPorter
Forum Members
Forum Members
Posts: 36
Joined: Fri Mar 06, 2009 5:33 pm

Re: [SOLVED] TinyMCE Eats HTML

Post by BenedictPorter »

DOCTYPE!

That's all I'm gonna say on the matter... ;D
ukmgranger
Forum Members
Forum Members
Posts: 72
Joined: Wed Apr 04, 2007 9:54 am

Re: [SOLVED] TinyMCE Eats HTML

Post by ukmgranger »

Can you be a little more specific on the solution.  I have this problem and it is driving me up the wall!
BenedictPorter
Forum Members
Forum Members
Posts: 36
Joined: Fri Mar 06, 2009 5:33 pm

Re: [SOLVED] TinyMCE Eats HTML

Post 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.
SUUD6501
Forum Members
Forum Members
Posts: 46
Joined: Wed Aug 22, 2007 8:43 am

Re: [SOLVED] TinyMCE Eats HTML

Post by SUUD6501 »

sorry but where is the code ?
many thanks
BenedictPorter
Forum Members
Forum Members
Posts: 36
Joined: Fri Mar 06, 2009 5:33 pm

Re: [SOLVED] TinyMCE Eats HTML

Post by BenedictPorter »

What code are you after?
SUUD6501
Forum Members
Forum Members
Posts: 46
Joined: Wed Aug 22, 2007 8:43 am

Re: [SOLVED] TinyMCE Eats HTML

Post 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
NaN

Re: [SOLVED] TinyMCE Eats HTML

Post by NaN »

SUUD6501 wrote: I can't see the code in your post dated...
So please ban the IE from your System ;)
Post Reply

Return to “Modules/Add-Ons”