[CLOSED] html js event

  1. #1

    [CLOSED] html js event

    hi,

    HtmlEdr2.AddScript("onkeypress", "return false;");
    This javascript event not working for me.

    how to add keypress js event in htmleditor?


  2. #2

    RE: [CLOSED] html js event

    Hi,

    HtmlEditor does not supported all of the Field's properties and events.

    The supported API you can see at
    http://extjs.com/deploy/dev/docs/?cl...orm.HtmlEditor

    You can use the following javascript function to catch key event

    function catchKey(ed, fn){        
        if(Ext.isGecko){
            Ext.EventManager.on(ed.doc, 'keypress', fn, ed);
        }
        if(Ext.isIE || Ext.isSafari || Ext.isOpera){
            Ext.EventManager.on(ed.doc, 'keydown', fn, ed);
        }
    }
    
    catchKey(HtmlEditor1, function(){return false;});
    But "return false;" has no sense because HtmlEditor has own keys handlers.

    We are working on ReadOnly support for HtmlEditor

Similar Threads

  1. Replies: 2
    Last Post: Nov 03, 2011, 5:24 PM
  2. [CLOSED] Blur event for HTML Editor
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 03, 2011, 1:40 PM
  3. [CLOSED] Direct event parameter html value problem
    By kenanhancer in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Jan 05, 2011, 4:30 PM
  4. [CLOSED] How to detect SpliterBar Move event from Resize event
    By randy85253 in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Dec 27, 2010, 5:08 PM
  5. Replies: 1
    Last Post: May 28, 2010, 1:13 PM

Posting Permissions