is there a way to force paste as plain text if the text is from word.
we'd like to be able to force plain text from word docs but not from other sources.
thanks.
we'd like to be able to force plain text from word docs but not from other sources.
thanks.
RE: paste from word
You can code a function for the paste event and then convert the HTML that is pasted from Word into plain-text by stipping the HTML from the pasted content AFTER checking the content to make sure it was in-fact pasted from Word by parsing the content for those items that are unique to Word.
From my own experience... Most novice users who use my web based CMS have wanted to use Word to create content rather than a web based WYSIWYG HTML Editor in which case I would want to parse the content they paste from Word to remove the extraneous XML that might conflict with their ability to edit the pasted content later on using the WYSIWYG HTML Editor in addition to performing a sanity check on the pasted content to ensure there are no obvious conflicts with existing CSS definitions OR to alternatively apply existing CSS definitions to the pasted content.
My own approach is more complex than what others might wish to code but then my web based CSS is a bit more complex also from others I have seen since my own CSS has a built-in SCM (Source Code Management system) that allows people to develop then stage then publish to production all within the same CMS.