npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@eonasdan/editorjs-parser

v1.0.3

Published

Easily convert json data from editorjs to html elements

Downloads

7

Readme

EditorJs Data Parser

Easily convert json data from editorjs to html elements.

npm npm npm github

This fork was made to work with my static blog engine and Bootstrap 5.

Installaton

npm i editorjs-data-parser

Suppoted tools

  • :white_check_mark: checklist
  • :white_check_mark: embed
  • :white_check_mark: head
  • :white_check_mark: link
  • :white_check_mark: list
  • :white_check_mark: marker
  • :white_check_mark: image
  • :white_check_mark: paragraph
  • :white_check_mark: quote
  • :white_check_mark: raw
  • :white_check_mark: table
  • :white_check_mark: code
  • :white_check_mark: warning
  • :white_check_mark: delimeter

Usage example

import EditorJS from "@editorjs/editorjs";
import CheckList from "@editorjs/checklist";
import Code from "@editorjs/code";
import Header from "@editorjs/header";
import List from "@editorjs/list";
import Embed from "@editorjs/embed";
import Delimiter from "@editorjs/delimiter";
import Marker from "@editorjs/marker";
import Image from "@editorjs/image";
import Raw from "@editorjs/raw";
import Table from "@editorjs/table";
import Warning from "@editorjs/warning";
import { editorJsParser } from "editorjs-data-parser";

const editor = new EditorJS({
  tools: {
    header: {
      class: Header,
      inlineToolbar: true
    },
    list: {
      class: List,
      inlineToolbar: true
    },
    checklist: CheckList,
    delimiter: Delimiter,
    marker: Marker,
    embed: {
      class: Embed,
      inlineToolbar: false,
      config: {
        services: {
          youtube: true,
          coub: true
        }
      }
    },
    image: {
      class: Image,
      config: {
        endpoints: {
          byFile: "http://localhost:8008/uploadFile", // Your backend file uploader endpoint
          byUrl: "http://localhost:8008/fetchUrl" // Your endpoint that provides uploading by Url
        }
      }
    },
    checkList: CheckList,
    code: Code,
    raw: Raw,
    table: Table,
    warning: Warning,
  }
});

let btnConvert = document.getElementById("btnConvert");
btnConvert.addEventListener("click", () => {
  editor.save().then((outputData) => {
    let result = eonasdan.parser(outputData.blocks);
    console.log(result);
  });
});

Install supported tools

npm i --save @editorjs/checklist

npm i --save @editorjs/code

npm i --save @editorjs/header

npm i --save @editorjs/list

npm i --save @editorjs/embed

npm i --save @editorjs/delimiter

npm i --save @editorjs/marker

npm i --save @editorjs/marker

npm i --save @editorjs/image

npm i --save @editorjs/raw

npm i --save @editorjs/table

npm i --save @editorjs/warning