Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

editorjs-viewer

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

editorjs-viewer

easy change json data to html from editorjs

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
21
Maintainers
1
Weekly downloads
 
Created
Source

editorjs-viewer

npm install editorjs-viewer

editorjs-viewer is tool to convert json data to html from editorjs.
suported component

  1. checklist
  2. embed
  3. head
  4. link
  5. list
  6. paragraph
  7. quote
  8. raw
  9. table
  10. code
  11. 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)
// outout
// <h2>header example</h2>

LICENCE MIT

Keywords

FAQs

Package last updated on 21 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc