markdown-block-editor

1.1.0 • Public • Published

Wiz React Markdown Editor

Install:

yarn add markdown-block-editor

准备接入qiankun

Config:

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

Usage:

import 'markdown-block-editor/lib/index.min.css';
import Editor from 'markdown-block-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:

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

publish

  • npm adduser
  • npm run pub

Readme

Keywords

none

Package Sidebar

Install

npm i markdown-block-editor

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

9.24 MB

Total Files

919

Last publish

Collaborators

  • linkmind2