groovy-edit-react

0.1.0 • Public • Published

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

Package Sidebar

Install

npm i groovy-edit-react

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

18.3 kB

Total Files

3

Last publish

Collaborators

  • bruceliu68