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

@stfy/react-editor.js

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stfy/react-editor.js

React wrapper component for Editor.js

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
143
decreased by-44.14%
Maintainers
1
Weekly downloads
 
Created
Source

react-editor.js

npm version

React wrapper component for Editor.js

Install

npm install --save @stfy/react-editor.js

// or Yarn

yarn add @stfy/react-editor.js

Usage


import React, { Component } from 'react'
import Editor from '@stfy/react-editor.js'

const App => (
  <>
    <Editor
        autofocus
        holderId="editorjs-container"
        excludeDefaultTools={['header']}
        onChange={(data) => console.log(data)}
        customTools={{
          header: CustomHeader
        }}
        onReady={() => console.log('Start!')}
        data={{
          "time" : 1554920381017,
          "blocks" : [
              {
                  "type" : "header",
                  "data" : {
                      "text" : "Hello Editor.js",
                      "level" : 2
                  }
              },
          ],
          "version" : "2.12.4"
        }}
      />
  </>
)

Props

NameTypeDefaultDescription
autofocusbooleantrueSet Caret to the Editor after initialisation
holderIdstringeditorjs-holderId of Element that should contain the Editor
onChangefunctionnullonChange callback
onReadyfunctionnullonReady callback
dataobjectnullPreviously saved data that should be rendered
customToolsobjectnullSet custom tools config or overwrite existed
excludeDefaultToolsarraynullExclude default tool by tool name

Default tools

NamePackage
header@editorjs/header
list@editorjs/list
inlineCode@editorjs/inlineCode
image@editorjs/image
embed@editorjs/embed
quote@editorjs/quote
marker@editorjs/marker
code@editorjs/code
link@editorjs/link
delimiter@editorjs/delimiter
raw@editorjs/raw
table@editorjs/table
warning@editorjs/warning
paragraph@editorjs/paragraph
checklist@editorjs/checklist

Contributing

Welcome to contribute.

License

MIT Licensed. License 2019

Keywords

FAQs

Package last updated on 28 Sep 2019

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