添加一个保存按钮
// 添加一个按钮
const saveButton = editor.Panels.addButton('views', {
id: 'show-panel-button',
className: 'fa fa-save',
command: 'save-file',
attributes: {
title: '保存'
}
});
editor.Commands.add('save-file', {
run: (editor, sender) => {
//写点击按钮触发的代码
}
});
网友回复