Socket
Book a DemoInstallSign in
Socket

@c0b41/react-editor.js

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@c0b41/react-editor.js

React wrapper component for Editor.js

1.3.3
latest
Source
npmnpm
Version published
Weekly downloads
10
11.11%
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

react

FAQs

Package last updated on 10 Mar 2023

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.