mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Resolve #1192
This commit is contained in:
parent
47e3fc90f2
commit
0e3ed0fea0
2 changed files with 18 additions and 0 deletions
2
dev/External/SquireUI.js
vendored
2
dev/External/SquireUI.js
vendored
|
|
@ -289,6 +289,8 @@ class SquireUI
|
|||
this.plain = plain;
|
||||
this.wysiwyg = wysiwyg;
|
||||
|
||||
dispatchEvent(new CustomEvent('squire-toolbar', {detail:{squire:this,actions:actions}}));
|
||||
|
||||
toolbar.className = 'squire-toolbar btn-toolbar';
|
||||
let group, action/*, touchTap*/;
|
||||
for (group in actions) {
|
||||
|
|
|
|||
|
|
@ -440,6 +440,22 @@ and called in JavaScript using rl.pluginRemoteRequest().
|
|||
event.detail = 'screenname'
|
||||
cancelable using preventDefault()
|
||||
|
||||
### squire-toolbar
|
||||
event.detail = { squire: SquireUI, actions: object }
|
||||
`actions` is the toolbar structure.
|
||||
```javascript
|
||||
block-of-buttons: {
|
||||
button-name: {
|
||||
select: ['selectbox options'],
|
||||
html: 'button text',
|
||||
cmd: () => `command to execute`,
|
||||
key: 'keyboard shortcut',
|
||||
matches: 'HTML elements that match'
|
||||
}
|
||||
}
|
||||
```
|
||||
See [SquireUI.js](https://github.com/the-djmaze/snappymail/blob/master/dev/External/SquireUI.js)
|
||||
for all default toolbar actions.
|
||||
|
||||
# JavaScript `rl` object
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue