📅  最后修改于: 2022-03-11 14:49:11.790000             🧑  作者: Mango
var emojiBtn = function (context) {
var ui = $.summernote.ui;
var list = $('#elements-list').val();
var button = ui.buttonGroup([
ui.button({
className: 'dropdown-toggle',
contents: ' ',
tooltip: "Insert Greetings",
data: {
toggle: 'dropdown'
}
}),
ui.dropdown({
className: 'drop-default summernote-list',
contents: ""+list+"
",
callback: function ($dropdown) {
$dropdown.find('li').each(function () {
$(this).click(function() {
context.invoke("editor.insertText", $(this).html());
});
});
}
})
]);
return button.render();
}