tinyMce shortcuts

thefreestyler

New Member
I am working with an asp.net website where we have implemented shortcuts in our page master, but these don't seem to work when the tinymce editor has focus. is there any way to solve this issue? it doesn't matter if it's at master page level or tinymce-level.I have tried to create custom methods via the addShortcut method but this causes my javascript to error.\[code\] page.ClientScript.RegisterStartupScript(page.GetType(), new Guid().ToString(), "ShortCutModule();", true); string enableShortcuts = @"function enableShortcuts(){"+ @"tinyMCE.get('"+"myKey2"+this.ID+@"').addShortcut(""Ctrl+Shift+f12"",""nix"",""jourcut"");"; page.ClientScript.RegisterStartupScript(page.GetType(), new Guid().ToString(), enableShortcuts, true); page.ClientScript.RegisterStartupScript( page.GetType(), "MyKey2" + this.ID, @"<script type=""text/javascript"" >" + @"tinyMCE.init({" + @"oninit : ""enableShortcuts"","+ @"mode: ""exact""," + @"elements: """ + this.ID + @"""," + @"theme: ""advanced""," + @"plugins: ""spellchecker,advhr,insertdatetime,preview""," + @"theme_advanced_buttons1: ""bold,italic,underline,|,outdent,indent,|,cut,copy,paste,|,undo,redo""," + @"theme_advanced_toolbar_location: ""top""," + @"theme_advanced_toolbar_align: ""left""," + @"theme_advanced_statusbar_location: ""bottom""," + "custom_shortcuts : false," + "theme_advanced_path : false," + "setup : function(ed) {" + "ed.addCommand('jourcut', function() {CutFromJournal();});" + "}" + "});" + "</script>",false);\[/code\]
 
Back
Top