首页
话题
消息
手册
我的
返回介绍

tinymce-Shortcuts

发布于 2019-05-06 字数2221 浏览 711 评论 0

Examples

editor.shortcuts.add('ctrl+a', "description of the shortcut", function() {});
editor.shortcuts.add('meta+a', "description of the shortcut", function() {}); // "meta" maps to Command on Mac and Ctrl on PC
editor.shortcuts.add('ctrl+alt+a', "description of the shortcut", function() {});
editor.shortcuts.add('access+a', "description of the shortcut", function() {}); // "access" maps to ctrl+alt on Mac and shift+alt on PC

Methods

name summary defined by
add() Adds a keyboard shortcut for some command or function. tinymce.Shortcuts
remove() Remove a keyboard shortcut by pattern. tinymce.Shortcuts

Methods

add

add(pattern:String, desc:String, cmdFunc:String, scope:Object):Boolean

Adds a keyboard shortcut for some command or function.

Parameters
  • pattern (String) – Shortcut pattern. Like for example: ctrl+alt+o.
  • desc (String) – Text description for the command.
  • cmdFunc (String) – Command name string or function to execute when the key is pressed.
  • scope (Object) – Optional scope to execute the function in.
Return value
  • Boolean – true/false state if the shortcut was added or not.

remove

remove(pattern:String):Boolean

Remove a keyboard shortcut by pattern.

Parameters
  • pattern (String) – Shortcut pattern. Like for example: ctrl+alt+o.
Return value
  • Boolean – true/false state if the shortcut was removed or not.

Can’t find what you’re looking for? Let us know.

Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.

您暂时不能评论!

管理员开启了需要登录才能够评论,你可以免费注册一个本站的账号。

还没有评论!

目前还没有任何评论,快来抢沙发吧!