esims
esims

Reputation: 420

TinyMCE 5 custom button icon

How can I use the emoticons icon from the default TinyMCE buttons for my own custom button with TinyMCE version 5? With TinyMCE version 4 I could do it like this:

setup: function (editor) {
    editor.addButton('emoji', {
        icon: 'btn_emoji',
        tooltip: "Emoji",     
        onclick: function () {
            ... some actions ...
        }
    });
},  

Upvotes: 0

Views: 465

Answers (1)

esims
esims

Reputation: 420

I have found the list of icon identifiers:

So the code is:

setup: function (editor) {
    editor.addButton('emoji', {
        icon: 'emoji',
        tooltip: "Emoji",     
        onAction: function () {
            ... some actions ...
        }
    });
}, 

Upvotes: 1

Related Questions