admin管理员组

文章数量:1302270

t seems like a simple question, but I've been trying to do this for more than 2 days. How can I configure TinyMCE so that the element is inserted into the current block, rather than creating a new one?

problem:

tinymce.activeEditor.insertContent(`<sticker-text></sticker-text>`);

And this inserts it not into the current tag "p", but creates a break and inserts it on a new line in a separate block.

I've tried that configuration, but it didn't give me any results.

formats: {
    stickertext: { inline: 'span' }
},

The expected result would be:

本文标签: TinyMCE insert tag element as inlineStack Overflow