
committed by
GitHub

No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 115 additions and 30 deletions
-
2_config.yml
-
11_includes/codepens/custom-shortcut/index.html
-
11_includes/codepens/custom-shortcut/index.js
-
4_includes/codepens/custom-toolbar-split-button/index.js
-
28_includes/components/choice-menu-items.md
-
11_includes/misc/shortcut-os-mappings.md
-
13advanced/keyboard-shortcuts.md
-
4ui-components/contextform.md
-
4ui-components/dialog.md
-
4ui-components/dialogcomponents.md
-
15ui-components/menuitems.md
-
36ui-components/typesoftoolbarbuttons.md
-
2ui-components/urldialog.md
@ -0,0 +1,11 @@ |
|||
<textarea id="custom-shortcut"> |
|||
<p>To add a yellow highlight to this text:</p> |
|||
<ul> |
|||
<li>Select some text |
|||
<ul> |
|||
<li>On PC, press: Ctrl+Alt+Y</li> |
|||
<li>On MacOS, press: Command+Option+Y</li> |
|||
</ul> |
|||
</li> |
|||
</ul> |
|||
</textarea> |
@ -0,0 +1,11 @@ |
|||
tinymce.init({ |
|||
selector: "textarea#custom-shortcut", |
|||
content_css: '//www.tiny.cloud/css/codepen.min.css', |
|||
height: 300, |
|||
setup: function (editor) { |
|||
editor.addShortcut( |
|||
'meta+alt+y', 'Add yellow highlight to selected text.', function () { |
|||
editor.execCommand('hilitecolor', false , '#FFFF00'); |
|||
}); |
|||
} |
|||
}); |
@ -0,0 +1,28 @@ |
|||
#### Choice menu items |
|||
|
|||
Choice menu items are a special type of menu item used for split toolbar button menu items. For information on split buttons, see: [Split toolbar buttons]({{site.baseurl}}/ui-components/typesoftoolbarbuttons/#splitbutton). |
|||
|
|||
##### Config options |
|||
|
|||
| Name | Value | Requirement | Description | |
|||
| ---- | ----- | ----------- | ----------- | |
|||
| text | string | optional | Text to display. | |
|||
| icon | string | optional | {{site.predefinedIconsOnly}} | |
|||
| value | string | required | A value that is passed to `onItemAction` when the choice menu item is clicked. | |
|||
| disabled | boolean | optional | default: false - Represents the menu item's state. When true, the menu item is unclickable. Toggled by the menu item's API. | |
|||
| shortcut | string | optional | Sets a keyboard shortcut for activating the menu item, such as: `shortcut: 'Ctrl+Alt+Delete'`. For information on available shortcut modifiers, see: [Shortcut modifier key mappings](#shortcutmodifierkeymappings). | |
|||
|
|||
> **Note**: The `icon` option for choice menu items was added in {{site.productname}} 5.3. |
|||
|
|||
####{% include misc/shortcut-os-mappings.md %} |
|||
|
|||
##### API |
|||
|
|||
| Name | Value | Description | |
|||
| ---- | ----- | ----------- | |
|||
| isActive | () => boolean | Checks if the menu item is active. | |
|||
| setActive | (state: boolean) => void | Sets the menu item's active state. | |
|||
| isDisabled | () => boolean | Checks if the menu item is disabled. | |
|||
| setDisabled | (state: boolean) => void | Sets the menu item's disabled state. | |
|||
|
|||
For an example of how choice menu items are used in split toolbar buttons, see: [Split button example and explanation]({{site.baseurl}}/ui-components/typesoftoolbarbuttons/#splitbuttonexampleandexplanation). |
@ -0,0 +1,11 @@ |
|||
## Shortcut modifier key mappings |
|||
|
|||
When creating shortcuts for {{site.productname}}, the following modifiers can be used. Some modifiers map to different keys, depending on the user's operating system. |
|||
|
|||
| Modifier | PC | MacOS | |
|||
|----------|-----------|----------------| |
|||
| `Meta` | Ctrl | Command | |
|||
| `Shift` | Shift | Shift | |
|||
| `Ctrl` | Ctrl | Control | |
|||
| `Alt` | Alt | Option | |
|||
| `Access` | Shift+Alt | Control+Option | |
Write
Preview
Loading…
Cancel
Save
Reference in new issue