htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0:
Force specific font


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


durandal
New User

Jan 27, 2005, 2:28 PM

Post #1 of 2 (2047 views)
Shortcut
Force specific font Can't Post

Hi,

My users are not allowed to modify the font they use to enter text in HTMLArea. However, some are circumventing this by pasting formatted text from other applications (wordpad, word, etc.).

Is there a way to strip pasted text from any formatting?

Thanks,

Durdandal


Joshua
Novice

Jan 28, 2005, 2:08 AM

Post #2 of 2 (2034 views)
Shortcut
Re: [durandal] Force specific font [In reply to] Can't Post

Find the row:

editdoc.body.onpaste = function() {editor_event(objname, 100); }

There you can call on this function:

function cleanup_pasted(objname) {
var mytext = window.clipboardData.getData('Text');
window.clipboardData.clearData('Text');
window.clipboardData.clearData('HTML');
window.clipboardData.setData('Text', mytext);
}

like

editdoc.body.onpaste = function() {cleanup_pasted(objname);editor_event(objname, 100); }

/joshua

 
 
 


Search for (options)