Wednesday, February 1, 2012

TinyMCE Text Area (Onchange event issue)

Hi All,

Anyone who is using tiny mce plugin might had faced an issue with onchange event not triggering in firefox, i resolved this issue as under :

I added a call back in tiny mce's init function as under ::

tinyMCE.init({
  // General options
  handle_event_callback : "myHandleEvent",


i then created a java script function as below which keeps track of key press, key down and key up for text areas :

function myHandleEvent(e) {
       
        
        if(e.type=='keypress' || e.type=='keyup' || e.type=='keydown')
        {
         temp=false;
          
        }

        return true; // Continue handling
}

Thanks,

Ujjwal Soni

No comments: