📜  summernote 问题下拉列表 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:12.526000             🧑  作者: Mango

代码示例2
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(); }