views:

46

answers:

2

We have an rich client application running with dojo 1.2.x.

Sometimes users are pasting comments from their word 2007 into an textfield.This is an repeating source for errors with displaying this comments inside an an dojox.grid.

Is there any "javascript" way to stop users pasting from word?

+1  A: 

Nope. But shoving it through HTML Tidy or one of its bindings can clean up the MSO cruft.

Ignacio Vazquez-Abrams
sounds like an "complex" solution. Will check tidy.. thanks!
ArneRie
Well, it's going to the server eventually anyways, so you may as well handle it there.
Ignacio Vazquez-Abrams
+1  A: 

With Dojo 1.5 (currently beta) there comes a plugin for the editor where you can paste from word.

http://www.dojotoolkit.org/reference-guide/dojox/editor/plugins/PasteFromWord.html

I think upgrading is the best way.

Sid Burn