Page 1 of 1

Paste HTML into TinyMCE

Posted: Sat May 09, 2009 7:41 pm
by Sonya
Hello,

I need to paste HTML into TinyME without turning off TinyMCE. The reason for it it, that I have very large content pages and it takes very long to find the right place to add in the html source. For the editors with just little html knowledge it is almost impossible.

So how can I just place the cursor at the right place and add the html piece from the clip board?

It would be also OK, if html tags are not converted to entities in general.

Please help,
Sonya

Re: Paste HTML into TinyMCE

Posted: Sat May 09, 2009 7:49 pm
by JeremyBASS
Just a thought... so you can take items from the clipboard in js... and you can fake clicks and read clicks in js... so replace the process and scrub the stuff coming from the CB... but thinking of it... if I copy some page content and place it in it picks some of the formating up... anyways... just some thoughts....

Cheers
Jeremy

Re: Paste HTML into TinyMCE

Posted: Sat May 09, 2009 8:45 pm
by Sonya
I have just figured out that not all html tags are striped from the code. h2 or pre are added literally, but not object or iframe. The last both are converted to plain text.

Can somebody help to solve it?
Thank you,
Sonya

Re: Paste HTML into TinyMCE

Posted: Sat May 09, 2009 9:22 pm
by JeremyBASS
I'd look to

\modules\TinyMCE\tinymce\jscripts\tiny_mce\plugins\paste\editor_plugin.js

you'll find the rules like

paste_replace_list
paste_convert_headers_to_strong
etc...


Hope that helps
jeremyBass