-
Notifications
You must be signed in to change notification settings - Fork 1
/
buttongroup.js
30 lines (30 loc) · 958 Bytes
/
buttongroup.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
(function() {
tinymce.PluginManager.add('gk_tc_button2', function( editor, url ) {
editor.addButton( 'gk_tc_button2', {
title: 'My test button II',
type: "buttongroup",
items: [
{
title: 'First button',
icon: 'icon dashicons-wordpress',
onclick: function() {
editor.insertContent('Hello World I');
}
},
{
title: 'Second button',
type: 'menubutton',
icon: 'icon dashicons-wordpress-alt',
menu: [
{
text: "Item I"
},
{
text: "Item II"
}
]
}
]
});
});
})();