# 菜单配置
> 1.5.0 新增 `menucfg` 字段,用于菜单配置,可以配置常用选项和高级选项,并且文案可改动。
## 配置
```
var myEditor = new window.xEditor('#xe')
myEditor.config({
menucfg: {
often: { // 常用选项:
text: '常用选项:',
},
high: { // 高级选项:
text: '高级选项:',
menus: [ // 配置所显示菜单的功能
'full', // 全屏
'code', // 源代码
'copy', // 复制
'cut', // 剪切
'paste', // 普通粘贴
'plainpaste', // 粘贴为无格式文本
'wordpaste', // 从 MS Word 粘贴
'table', // 表格
'video', // 插入视频
],
}, // end high
}, // end menucfg
});
myEditor.create();
```
## 说明
- 为了兼容之前版本, `menucfg` 字段并不是默认配置中的字段。算是高级功能需要自行配置。
- `often` 和 `high` 字段必须同时存在,配置才会生效
- `often` 中 `text` , high 中的 `text` 和 `menus` 必须同时存在
- `high` 中的 `menus` 必须有内容,也就是数组不能为空
