Skip to content Skip to sidebar Skip to footer

How To Catch Ctrl+s Key In Tinymce In Jqgrid Edit Form

Ctrl+S and Ctrl+Q keys are cathed in jqgrid edit and add forms using Oleg great answer: beforeShowForm: function ($form) { var gridIdEncoded = $.jgrid.jqID($form[0].id.substring(

Solution 1:

I don't use tinyMCE myself, but short examine of the demo shows that tinyMCE uses <iframe>. If you need to catch keydown event inside of the <iframe> too you should set additional keydown event handler. For the demo having

<textareaname="content"style="width:100%"></textarea>

the id of the <iframe> will be used content_ifr. So you can try to find the <iframe> by id constructed in the way or just try to find and child iframe in the <span> sibling to the <textarea>. Then you can get .contentWindow.document from the <iframe> element and set keydown event handler on the .contentWindow.document. See the answer and this one for more information. Probably some other more tinyMCE oriented solution like here would be better. Because I don't use tinyMCE myself (see the first sentence of my answer), I can't recommend you some specific way.

UPDATED: It seems to me now that there are more direct way which provide tinyMCE: onKeyDown.

Post a Comment for "How To Catch Ctrl+s Key In Tinymce In Jqgrid Edit Form"