gpt4 book ai didi

Tinymce add custom button on Voyager(Tinymce在旅行者上添加自定义按钮)

转载 作者:bug小助手 更新时间:2023-10-25 22:31:48 24 4
gpt4 key购买 nike



I have to create a custom button on my TinyMCE editor on Voyager, but its not working,

我不得不在旅行者的TinyMCE编辑器上创建一个自定义按钮,但它不起作用。


Here is my code:

以下是我的代码:


function tinymce_setup_callback(editor)
{
console.log("loaded");
editor.ui.registry.addButton('customInsertButton', {
text: 'My Button',
onAction: function (_) {
editor.insertContent('&nbsp;<strong>It\'s my button!</strong>&nbsp;');
}
});
}


I am sure this code can be executed, but not working.

我确信这段代码可以执行,但不能工作。


I tried a lot of different stuff, but I have no ideas anymore.

我尝试了很多不同的东西,但我再也没有想法了。


更多回答
优秀答案推荐
更多回答

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com