0.1.3 • Published 3 years ago

cypher-editor v0.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

一、本地开发环境搭建

  • node >=10

Install

yarn install

Usage

yarn run start

Run tests

yarn run test

二、组件使用示例

  1. 使用 npm 或 yarn进行安装
  2. 使用:在需要使用的地方引入该组件即可
import CodeEditor from 'cypher-editor'
  1. 组件传参
  1、codemirror配置参数:editorConfig: {
      lineNumbers: boolean;
      mode: string;
      theme: string, // 主题
      showCursorWhenSelecting: boolean,
      lineWiseCopyCut?: boolean, // 复制
      undoDepth: number, // 最大回退次数
      tabindex: number,
      autofocus: boolean,
      width: string;
      height: string;
  }
  2、代码编辑器默认值:initValue:'match (n) return n limit 10'
  3、接收编辑器内容函数: getEditorValue
  1. 支持主题 theme: 'base16-dark','xq-dark','erlang-dark','eclipse','blackboard'
  2. 支持语言 mode: 'sql','cypher'

Author

👤 annawang

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by readme-md-generator