groovy-edit-react
v0.1.0
Published
groovy公式编辑器
Maintainers
Readme
groovy-edit-react
groovy语法编辑器
Usage
groovy-edit-react
安装
npm install --save-dev groovy-edit-react使用
<GroovyEditor
defaultCode={defaultCode}
readOnly={true}
height={300}
theme="night"
activeLine={true}
fold={true}
keywords=["const", "var"]
onChange={(code) => this.getCode(code)}
/>props参数:
| 参数 | 类型 | 默认值 | 是否必填 | 说明 | | :------: | :-----: | :----: | :------: | :----------: | | defaultCode | string | "" | 非必填 | 初始化赋值 | | code | string | "" | 非必填 | | | readOnly | boolean | false | 非必填 | 设置只读 | | height | number | 300 | 非必填 | 编辑器高度 | | theme | string | "day" | 非必填 | 主题:"day"和"night" | | activeLine | boolean | true | 非必填 | 当前行选中标识 | | fold | boolean | true | 非必填 | 代码折叠 | | keywords | array | [] | 非必填 | 自定义提示关键词 | | onChange | function| 无 | 非必填 | 返回code |
keywords 自定义关键词
keywords: ["const", "var"],License
MIT
