Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Plain Text in TINY MCE

 

 


design9
User

Nov 30, 2010, 9:14 AM

Post #1 of 9 (930 views)
Shortcut
Plain Text in TINY MCE Can't Post

Hello,

Is there a way to adjust the settings in the TINY Mce for the plain Text button to have it always stay on plain text so it doesn't toggle back and forth between it?

Thank you,

April


Jason
Staff / Moderator


Nov 30, 2010, 10:28 AM

Post #2 of 9 (926 views)
Shortcut
Re: [apdance9] Plain Text in TINY MCE [In reply to] Can't Post

Hi April,

Do you mean only viewing the HTML code instead of the rich text? I don't believe TinyMCE supports that.
---------------------------------------------------
Jason Sauchuk - Programmer 
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/ 


design9
User

Nov 30, 2010, 12:02 PM

Post #3 of 9 (920 views)
Shortcut
Re: [Jason] Plain Text in TINY MCE [In reply to] Can't Post

No, I mean in the actual text editor in CMS backend. The plain text option/button now toggles back and forth between inserting plain text and non-plain text when copy and pasting in content. Example: If I copy my content and hit the plain text button to paste, a box will pop up that tells me I am pasting in plain text. However, the next time I hit the plain text button, it doesn't paste in plain text...the button toggles back and forth. I want to set it so it always pastes in plain text.

April


aev
User

Nov 30, 2010, 2:31 PM

Post #4 of 9 (914 views)
Shortcut
Re: [apdance9] Plain Text in TINY MCE [In reply to] Can't Post

Hi,

maybe this will help:
http://www.interactivetools.com/forum/gforum.cgi?post=79700#79700

-aev-


design9
User

Dec 2, 2010, 12:01 PM

Post #5 of 9 (882 views)
Shortcut
Re: [aev] Plain Text in TINY MCE [In reply to] Can't Post

I tried this from this post but it is still not working. It actually makes the toggle worse than it was before. I want it to automatically stay on plain text all the time so I do not have to keep hitting the plain text button and toggling back and forth. Any other ideas to achieve this?

Thanks!

April


Jason
Staff / Moderator


Dec 2, 2010, 1:34 PM

Post #6 of 9 (878 views)
Shortcut
Re: [apdance9] Plain Text in TINY MCE [In reply to] Can't Post

Hi April,

You can try this:

Open up cmsAdmin/lib/wysiwyg.php (or wysiwyg_customer.php if you're using that instead).

About half way down the page you should see a block of code like this:

Code
// Paste From Word Settings - Docs: http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste 
// Un-comment these lines to have pasting default to text
//paste_text_sticky: true,
//setup: function(ed) {
// ed.onInit.add(function(ed) { // from: http://tinymce.moxiecode.net/punbb/viewtopic.php?pid=73053#p73053
// ed.pasteAsPlainText = true;
// ed.controlManager.setActive("pastetext", true);
// });
//},


Just uncomment these lines like this:

Code
// Paste From Word Settings - Docs: http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste 
// Un-comment these lines to have pasting default to text
paste_text_sticky: true,
setup: function(ed) {
ed.onInit.add(function(ed) { // from: http://tinymce.moxiecode.net/punbb/viewtopic.php?pid=73053#p73053
ed.pasteAsPlainText = true;
ed.controlManager.setActive("pastetext", true);
});
},


If for some reason you don't have this code at all in your file, paste it in under this:

Code
// Load Plugins: ***NOTE*** plugins must be added both loadWysiwygJavascript() and initWysiwyg() (twice in this page, search for "plugins:") 
plugins: "inlinepopups,contextmenu,table,fullscreen,paste,media,spellchecker",


This will set plain text pasting as default.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Programmer 
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/ 


design9
User

Dec 3, 2010, 9:29 AM

Post #7 of 9 (823 views)
Shortcut
Re: [Jason] Plain Text in TINY MCE [In reply to] Can't Post

Thanks Jason,

This did the trick!

April


zaba
User

Dec 22, 2011, 2:12 AM

Post #8 of 9 (517 views)
Shortcut
Re: [design9] Plain Text in TINY MCE [In reply to] Can't Post

Just to extend on this, if i dont have viewable the paste as text and paste from word buttons in the wysiwyg editor, can I have it so that if someone pastes in text from any source it automatically will paste it as plain text, without having to press any buttons, its just that why would anybody want to paste in really crappy word formatting to my crafted and considered designs. I just want the default paste text in wysiwyg to always be palin text.


Jason
Staff / Moderator


Dec 22, 2011, 12:22 PM

Post #9 of 9 (492 views)
Shortcut
Re: [zaba] Plain Text in TINY MCE [In reply to] Can't Post

Hi,

The change posted above should set "paste as plain text" to be the default. Give that a try and let us know if you run into any issues.

Thanks
---------------------------------------------------
Jason Sauchuk - Programmer 
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/