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",
}
},
}
...
});
字段 | 类型 | 描述 |
---|---|---|
placeholder | string | 插件的占位文本 |
defaultType | string | '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"
}