Plain Text in TINY MCE

9 posts by 4 authors in: Forums > CMS Builder
Last Post: December 22, 2011   (RSS)

By design9 - November 30, 2010

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

Re: [apdance9] Plain Text in TINY MCE

By Jason - November 30, 2010

Hi April,

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

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

Re: [apdance9] Plain Text in TINY MCE

By aev - November 30, 2010

Re: [aev] Plain Text in TINY MCE

By design9 - December 2, 2010

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

Re: [apdance9] Plain Text in TINY MCE

By Jason - December 2, 2010

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:
// 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:
// 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:
// 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 - Project Manager
interactivetools.com

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

Re: [Jason] Plain Text in TINY MCE

By design9 - December 3, 2010

Thanks Jason,

This did the trick!

April

Re: [design9] Plain Text in TINY MCE

By zaba - December 22, 2011

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.

Re: [zaba] Plain Text in TINY MCE

By Jason - December 22, 2011

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 - Project Manager
interactivetools.com

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