editorjs-viewer
npm install editorjs-viewer
editorjs-viewer is tool to convert json data to html from editorjs.
suported component
- checklist
- embed
- head
- link
- list
- paragraph
- quote
- raw
- table
- code
- warning
for styling quote and checklist we use bootstrap so make sure you have install bootstrap on your project
example
import { renderHTML } from 'editorjs-viewer'
const data = {
time: 1605667704216,
version: "2.19.0"
blocks: [
{
data: {
text: "header example",
level: 2
}
type: "header"
}
]
time: 1605667704216
version: "2.19.0"
}
const result = renderHTML(data.blocks)
console.log(result)
LICENCE MIT