Php Mybb sceditor额外字段

Php Mybb sceditor额外字段,php,command,mybb,sceditor,Php,Command,Mybb,Sceditor,我正在尝试使用三个文本区域字段向mybb sceditor添加额外内容,但它不允许我插入内容 我试图添加一个功能,但无法让它工作-帮助是感激的 $.sceditor.command.set('hidep', { _dropDown: function (editor, caller) { var $content; $content = $( '<div>' + '<div>

我正在尝试使用三个文本区域字段向mybb sceditor添加额外内容,但它不允许我插入内容

我试图添加一个功能,但无法让它工作-帮助是感激的

    $.sceditor.command.set('hidep', {
    _dropDown: function (editor, caller) {
        var $content;

        $content = $(
            '<div>' +
            '<div>' +
            '<label for="hidep">' + editor._('Amount of gems') + '</label> ' +
            '<input type="text" id="hidep" />' +
            '</div>' +
            '<div>' +
            '<label for="des">' + editor._('Content') + '</label> ' +
            '<input type="text" id="des" />' +
            '</div>' +
            
            '<div>' +
            '<label for="destitle">' + editor._('Title') + '</label> ' +
            '<input type="text" id="destitle" />' +
            '</div>' +              
            
            '<div><input type="button" class="button" value="' + editor._('Insert') + '" /></div>' +
            '</div>'
        );

        $content.find('.button').on('click', function (e) {
            var val = $content.find('#hidep').val(),
                description = $content.find('#des').val();
                descriptiontitle = $content.find('#destitle').val();
            if (val) {
                // needed for IE to reset the last range
                $(editor).trigger('focus');

                if (!editor.getRangeHelper().selectedHtml() || description) {
                    if (!description)
                        description = val;

                    editor.insert('[hide cost="' + val + '" ' + destitle + ']' + description + '[/hide]');
                } else
                    editor.execCommand('createlink', 'mailto:' + val);
            }

            editor.closeDropDown(true);
            e.preventDefault();
        });

        editor.createDropDown(caller, 'inserthidep', $content.get(0));
    },
    exec: function (caller) {
        $.sceditor.command.get('hidep')._dropDown(this, caller);
    }
});

您还需要设置BBCode。该代码创建用于操作的按钮。为了拥有BBCode,您需要查看如何创建BBCode命令(它是一个包含的插件)的部分。如果您指的是代码功能,我有allready插件,只需要在sceditor add按钮中输入BBCode的
title=“
[hide cost="50" title="Good Stuff"]This is hidden content[/hide]