Javascript 在TinyMCE中的自定义标记后插入新段落

Javascript 在TinyMCE中的自定义标记后插入新段落,javascript,tinymce,tinymce-4,Javascript,Tinymce,Tinymce 4,我有一个小的TinyMCE插件,它接收选定的文本并将其包装在标记中。 但是,当我在使用的线路之后开始一条新线路时,该线路会自动创建一个新的电话标签。我希望重写此行为,并在该行中获得一个 有没有办法告诉Tiny应该在手机后创建段落 这是我的插件: tinymce.PluginManager.add('example', function(editor, url) { // Add a button that opens a window editor.addButton('exam

我有一个小的TinyMCE插件,它接收选定的文本并将其包装在
标记中。 但是,当我在使用
的线路之后开始一条新线路时,该线路会自动创建一个新的电话标签。我希望重写此行为,并在该行中获得一个

有没有办法告诉Tiny应该在手机后创建段落

这是我的插件:

tinymce.PluginManager.add('example', function(editor, url) {
    // Add a button that opens a window
    editor.addButton('example', {
        text: 'Phone',
        icon: false,
        onclick: function() {
            // Open window
            editor.windowManager.open({
                title: 'Add phone number',
                data: { phone_no: editor.selection.getContent() },
                body: [
                    {type: 'textbox', name: 'phone_no', label: 'Phone number'}
                ],
                onsubmit: function(e) {
                    // Insert content when the window form is submitted
                    editor.setContent('<phone>' + e.data.phone_no + '</phone>');
                }
            });
        }
    });
});

我注意到在´

`中按enter键时出现了类似的“问题”。Tinymce-4 seam以自动方式继承最后一个块。这里可能有一个相关的问题。在用figcaption添加数字时有相同的问题,不能在下面添加新的段落

tinymce.init({
    selector: "textarea",
    toolbar: "example",
    plugins: "example",
    extended_valid_elements : "phone",
    custom_elements: "phone",
    valid_children: "phone[#text]",
    setup: function(editor) {
        editor.on('change', function(e) {
            console.log('change event', e.level.content);
        });
    }
 });