This commit is contained in:
2026-01-13 13:04:23 +08:00
parent 1755fd2202
commit 2a71d139ea
2 changed files with 27 additions and 2 deletions

View File

@@ -2148,7 +2148,32 @@ export default {
ed.insertContent('');
}
});
ed.ui.registry.addMenuButton('MoreSymbols', {
text: '···', // 按钮显示的三个点
tooltip: 'More Special Characters',
onAction: () => {}, // 菜单主按钮点击通常不执行操作,由子菜单执行
fetch: (callback) => {
const items = [
{
type: 'menuitem',
text: 'en-dash (短划线)',//短划线
onAction: () => ed.insertContent('')
},
{
type: 'menuitem',
text: 'minus sign (减号)',//减号
onAction: () => ed.insertContent('')
},
{
type: 'menuitem',
text: 'hyphen (连接符)',
onAction: () => ed.insertContent('-')
},
];
callback(items);
}
});
ed.ui.registry.addButton('removeBlue', {
text: 'Blue', // 按钮文本