英文网站排版,黄埔网站开发公司,查询域名备案,网站首页title想实现如下效果 首先在init方法中的props#xff0c;toolbar属性增加一个自定义按钮 增加一个setup方法 代码 setup: function(editor) { editor.ui.registry.addSplitButton(myDateButton, {text: 日期时间,onAction: (_) editor.insertContent(getJsMonthDay(getNowDat… 想实现如下效果 首先在init方法中的propstoolbar属性增加一个自定义按钮 增加一个setup方法 代码 setup: function(editor) { editor.ui.registry.addSplitButton(myDateButton, {text: 日期时间,onAction: (_) editor.insertContent(getJsMonthDay(getNowDate()) getWeekday(getNowDate())),onItemAction: (buttonApi, value) editor.insertContent(value),fetch: (callback) {const items [{type: choiceitem,text: 当天 月-日 周几,value: getJsMonthDay(getNowDate()) getWeekday(getNowDate())},{type: choiceitem,text: 本月 月-日 周几,value: getMonthAllDays()}];callback(items);}});},
操作效果下拉【日期日期】按钮选择某项菜单就会在光标所在处插入相应的字符。如下