editorjs-component-selector
v0.0.4
Published
![preview](/images/preview.png)
Downloads
56
Readme
Editor.js plugin for selecting of component (more likely simple selector)
Disclaimer
My advice: Do not use this library =) This lib do not render React components to Editor.js, just render image
Installation
yarn add editorjs-component-selector
Usage
import ComponentSelectorTool from "editorjs-component-selector";
// ...
var editor = EditorJS({
tools: {
component: {
class: ComponentSelectorTool,
config: {
components: [
{
name: "OrderForm",
alias: "Форма заявки",
props: {},
preview: "..."
}
]
}
}
}
});
Data example
{
"type": "component",
"data": {
"component": "OrderForm",
"props": {}
}
}