0.0.2 • Published 1 year ago

editorjs-quoted v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

CodePlus

editorjs-quoted工具是Editor.js的引述文字插件

安装

npm i -D editorjs-quoted

或者直接下载源码,使用dist/bundle.js.

使用

import Quoted from 'editorjs-quoted' 

使用

var editor = EditorJS({
  ...
  
  tools: {
    quoted: {
      class: Quoted,
      config:{
        placeholder:"占用文本",
        defaultType:"info",
      }
    },
  }
  
  ...
});

配置参数

字段类型描述
placeholderstring插件的占位文本
defaultTypestring'primary','secondary','info','success','warning','danger', 'light','dark', 任选其一

输入的数据

{
    "time": 1678006102022,
    "blocks": [
        {
            "id": "s-IbXvCx7L",
            "type": "quoted",
            "data": {
                "text": " 这是一个quoted插件",
                "type": "danger"
            }
        }
    ],
    "version": "2.26.5"
}
0.0.2

1 year ago

0.0.1

1 year ago