wiz-react-markdown-editor

0.5.38 • Public • Published

Wiz React Markdown Editor

Install:

npm install wiz-react-markdown-editor

// install beta version:
npm install wiz-react-markdown-editor@beta

Config:

如果使用Unsplash图库,需要把 Unsplash 的 Access Key 设置进 UNSPLASH_ACCESS_KEY 环境变量中

Usage:

import 'wiz-react-markdown-editor/lib/index.min.css';
import Editor from 'wiz-react-markdown-editor';

<Editor />;

Props:

属性 类型 默认值 必填 描述
width string\number '100%' 编辑器可编辑的最大宽度
onSelectImages function: () => string - 选择图片函数, 返回资源路径
markdown string '' 初始化时的 markdown 源码
focus boolean false 是否打开 focus 模式
typewriter boolean false 是否打开 typewriter 模式
onChange function ({ markdown, wordCount, cursor, history, toc }) => void () => {} 内容改变事件
resourceUrl string - 图片资源路,在添加路径为index_files/开头图片资源前面添加的资源路径
readOnly boolean false 只读
wordList string[] [] 标签列表

Edit Grammar:

  • 表情 => :<关键词>:

/wiz-react-markdown-editor/

    Package Sidebar

    Install

    npm i wiz-react-markdown-editor

    Weekly Downloads

    32

    Version

    0.5.38

    License

    MIT

    Unpacked Size

    5.98 MB

    Total Files

    838

    Last publish

    Collaborators

    • wizteam