PDA

View Full Version : HtmlEditor & raw text paste



Araberen
28 Nov 2011, 6:42 PM
Hi,

I am customizing the Ext.form.field.HtmlEditor element and I want to prevent HTML code to be pasted into the editor. Instead, I just want the raw text (without any HTML tag so) to be pasted.

I've been looking for an API option or a MIDAS command but didn't find anything.
Also, I can't find the place in the code where the paste command is handled.

Any idea/help?
Thanks.

mitchellsimoens
29 Nov 2011, 7:00 AM
I don't really think you can stop a paste action to do just raw text. You could warn people to switch to source edit mode to do ti but that's not really user friendly. You pass the midas commands on, you should use the execCmd method on the editor field.