其实只需要excludeKeys把group-image取消掉然后再插入一个uploadImage就行 不用去删除下拉:
//工具栏配置
const toolbarConfig: Partial<IToolbarConfig> = {
excludeKeys: [
"headerSelect",
"italic",
"group-more-style", // 排除菜单组,写菜单组 key 的值即可
"fontSize",
"bulletedList",
"list",
"lineHeight",
"bgColor",
"insertTable",
"group-image",
"group-video",
"fontFamily"
]
}
toolbarConfig.insertKeys = {
index: 20,
keys: "uploadImage"
}
最后的效果: