Forum closed. New forum available at http://community.wymeditor.org/

Disable pasting of styles

Support forum for WYMeditor.

Disable pasting of styles

Postby slmn on Wed Dec 02, 2009 6:25 pm

How do I disable the pasting of styles (from other sources - e.g. Word) into the editor box?

I have custom classes and styles that I want to maintain for the site, but at the same time allow the users to do some simple text formatting such as bold, italic and lists (ordered and unordered).

At the moment, I have users pasting text from Word documents, and WYMeditor created an embedded stylesheet in the box. This caused the generated output to break other related styles on the page as well. Is there an option in WYMeditor to strip out styles on pasting (and subsequently saving), instead of stripping it out on generated output?

Please advise.

Cheers.
slmn
 
Posts: 1
Joined: Wed Dec 02, 2009 6:17 pm

Re: Disable pasting of styles

Postby arnorhs on Wed Dec 16, 2009 11:27 am

I'm not an expert on wymeditor.

but you can enable a plug in called 'paste from word'

just make sure the following entry is in your 'toolsItems' javascript property when you init wym:
{'name': 'Paste', 'title': 'Paste_From_Word', 'css': 'wym_tools_paste'},

see more about the toolsItems, here:

http://trac.wymeditor.org/trac/wiki/0.5 ... toolsItems

best,
Arnor Heidar
arnorhs
 
Posts: 3
Joined: Sat Jan 17, 2009 9:34 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron