I'm running the newest version of everything.
I have the option set for tiny_mce to use the p tag for new line breaks, and that works fine.
However, when I paste multiple paragraph content either from word (paste from word option) or just normally, it enters all the paragraphs and uses
tags inbetween them all. If I hit enter after the last paragraph, it'll automatically add in only 1 tag at the start and finish of the page, and not inbetween each paragraph.
This means I have to go back and manually set each paragraph using the form select drop down. For long documents, this can be tedious. Also for clients it makes it more confusing.
[Solved] TinyMCE Not Adding <p> Tags From Pasted Content
[Solved] TinyMCE Not Adding <p> Tags From Pasted Content
Last edited by LeeUmm on Wed Feb 20, 2008 5:24 am, edited 1 time in total.
Re: TinyMCE Not Adding <p> Tags From Pasted Content
Yes, it can be tedious. I hope there is some ongoing fix.
May be we can workaround with CSS making visualy simulating ?
Pierre M.
May be we can workaround with CSS making visualy simulating ?
Pierre M.
Re: TinyMCE Not Adding <p> Tags From Pasted Content
Ok I've come up with a fix.
If you edit /modules/TinyMCE/tinyconfig.php and add this line to the tinyMCE.init() call, it will automatically clean up the content right after the paste and add the proper paragraphs.
Add:
paste_auto_cleanup_on_paste : true,
I'm using this in conjunction with the pasteword plugin and it does the trick. I'm noticing a bug in Firefox though, which will not let you backspace right after you paste content. Works fine in IE 6/7. Worst case with Firefox, you have to submit/apply the content to edit after the paste. Kind of annoying, but this will do for now.
If you edit /modules/TinyMCE/tinyconfig.php and add this line to the tinyMCE.init() call, it will automatically clean up the content right after the paste and add the proper paragraphs.
Add:
paste_auto_cleanup_on_paste : true,
I'm using this in conjunction with the pasteword plugin and it does the trick. I'm noticing a bug in Firefox though, which will not let you backspace right after you paste content. Works fine in IE 6/7. Worst case with Firefox, you have to submit/apply the content to edit after the paste. Kind of annoying, but this will do for now.
Re: TinyMCE Not Adding <p> Tags From Pasted Content
Thank you very much for sharing this.
May be this is a TinyMCE only bug (unrelated to CMSms) and should be reported upstream to theTinyMCE project ?
Pierre M.
May be this is a TinyMCE only bug (unrelated to CMSms) and should be reported upstream to theTinyMCE project ?
Pierre M.
Re: TinyMCE Not Adding <p> Tags From Pasted Content
Yes sorry, I should have been more clear in saying this is a bug with TinyMCE and not CMS made simple. Haven't had too much time to look further into it, as it's not a major issue with me. Most of my clients use IE so I don't have to explain this to them.
I've experienced the same bug with other CMS using TinyMCE.
[Edit] I just tried again today and did not experience the bug. I'm not sure if it was an issue with my Firefox when I tried doing it a few days ago, or if it was the content itself that was causing the bug. I'll experiment more with it and see, but today all is working fine. I'll try copy and pasting different type of content from different sources and see.
I've experienced the same bug with other CMS using TinyMCE.
[Edit] I just tried again today and did not experience the bug. I'm not sure if it was an issue with my Firefox when I tried doing it a few days ago, or if it was the content itself that was causing the bug. I'll experiment more with it and see, but today all is working fine. I'll try copy and pasting different type of content from different sources and see.
Last edited by LeeUmm on Wed Feb 20, 2008 5:38 am, edited 1 time in total.