All Projects → Jungwoo-An → React Editor Js

Jungwoo-An / React Editor Js

Licence: mit
⚛️📝The unofficial editor-js component for React

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Editor Js

Graphviz Visual Editor
A web application for interactive visual editing of Graphviz graphs described in the DOT language.
Stars: ✭ 261 (-41.22%)
Mutual labels:  wysiwyg
Craft.js
🚀 A React Framework for building extensible drag and drop page editors
Stars: ✭ 4,512 (+916.22%)
Mutual labels:  wysiwyg
Braft Editor
美观易用的React富文本编辑器,基于draft-js开发
Stars: ✭ 4,310 (+870.72%)
Mutual labels:  wysiwyg
React Native Rich Editor
Lightweight React Native (JavaScript, H5) rich text editor
Stars: ✭ 281 (-36.71%)
Mutual labels:  wysiwyg
Hyper Editor
A backend independent visual composer for web.
Stars: ✭ 332 (-25.23%)
Mutual labels:  wysiwyg
Elementor
The most advanced frontend drag & drop page builder. Create high-end, pixel perfect websites at record speeds. Any theme, any page, any design.
Stars: ✭ 4,207 (+847.52%)
Mutual labels:  wysiwyg
material-ui-theme-editor
Theme editor for material UI
Stars: ✭ 92 (-79.28%)
Mutual labels:  wysiwyg
Django Markdown Editor
Awesome Django Markdown Editor, supported for Bootstrap & Semantic-UI
Stars: ✭ 423 (-4.73%)
Mutual labels:  wysiwyg
Trumbowyg
A lightweight and amazing WYSIWYG JavaScript editor under 10kB
Stars: ✭ 3,664 (+725.23%)
Mutual labels:  wysiwyg
Slate Plugins
🔌 Next-gen slate plugins
Stars: ✭ 399 (-10.14%)
Mutual labels:  wysiwyg
Trix
A rich text editor for everyday writing
Stars: ✭ 16,546 (+3626.58%)
Mutual labels:  wysiwyg
Halloweenbash
Custom Bash Profile Generator
Stars: ✭ 331 (-25.45%)
Mutual labels:  wysiwyg
Grapesjs Mjml
Newsletter Builder with MJML components in GrapesJS
Stars: ✭ 379 (-14.64%)
Mutual labels:  wysiwyg
Text
📑 Collaborative document editing using Markdown
Stars: ✭ 282 (-36.49%)
Mutual labels:  wysiwyg
Draftail
📝🍸 A configurable rich text editor built with Draft.js
Stars: ✭ 413 (-6.98%)
Mutual labels:  wysiwyg
Django Front
Django-front is a front-end editing Django application
Stars: ✭ 257 (-42.12%)
Mutual labels:  wysiwyg
Re Editor
一个开箱即用的React富文本编辑器 🚀re-editor
Stars: ✭ 367 (-17.34%)
Mutual labels:  wysiwyg
Angular Editor
A simple native WYSIWYG editor component for Angular 6 -10+
Stars: ✭ 428 (-3.6%)
Mutual labels:  wysiwyg
Blocks
A JSX-based page builder for creating beautiful websites without writing code
Stars: ✭ 4,300 (+868.47%)
Mutual labels:  wysiwyg
Laravel Trix
Configurable Basecamp Trix Editor (WYSIWYG) delivered to your laravel application
Stars: ✭ 383 (-13.74%)
Mutual labels:  wysiwyg
Logo

npm version LICENSE Github Build Status Semantic Release enabled

🍞 DEMO

🍀 Supported Official Plugin

  • [x] Paragraph (default)
  • [x] Embed
  • [x] Table
  • [x] List
  • [x] Warning
  • [x] Code
  • [x] Link
  • [x] Image
  • [x] Raw
  • [x] Header
  • [x] Quote
  • [x] Marker
  • [x] CheckList
  • [x] Delimiter
  • [x] InlineCode
  • [x] SimpleImage

🤟🏻 Getting Started

Install via npm (or yarn)

# editorjs and official plugins
npm install --save-dev react-editor-js @editorjs/editorjs @editorjs/paragraph

Usage

import EditorJs from 'react-editor-js';

<EditorJs data={data} />;

📙 API

Allow all options of editor-js

Name Type Description
enableReInitialize Boolean Change editor-js data when componentDidUpdate
onChange (api: API, newData: OutputData) => void Fires when something changed in DOM
onCompareBlocks (newBlocks?: OutputData['blocks'], oldBlocks?: OutputData['blocks']) => boolean Use to avoid Infinite update when enableReInitialize used with onChange (Recommended Library)
onReady (instance?: EditorJS) => void Use to execute callback when editor-js instance has initialized

🧐 FAQ

How can I install plugins?

There is an only Paragraph block already included in Editor.js. Probably you want to use several Block Tools that should be installed and connected.

To add more Block Tools, simply add them to your repo and pass them as tools-property to your editor:

npm install --save-dev @editorjs/checklist
import EditorJs from 'react-editor-js';
import CheckList from '@editorjs/checklist';

<EditorJs data={data} tools={{ checkList: CheckList }} />;

We recommend to create a tools.js file and export your tools as a constant. Here is an example using all of the default plugins:

// tools.js
import Embed from '@editorjs/embed'
import Table from '@editorjs/table'
import Paragraph from '@editorjs/paragraph'
import List from '@editorjs/list'
import Warning from '@editorjs/warning'
import Code from '@editorjs/code'
import LinkTool from '@editorjs/link'
import Image from '@editorjs/image'
import Raw from '@editorjs/raw'
import Header from '@editorjs/header'
import Quote from '@editorjs/quote'
import Marker from '@editorjs/marker'
import CheckList from '@editorjs/checklist'
import Delimiter from '@editorjs/delimiter'
import InlineCode from '@editorjs/inline-code'
import SimpleImage from '@editorjs/simple-image'

export const EDITOR_JS_TOOLS = {
  embed: Embed,
  table: Table,
  paragraph: Paragraph,
  list: List,
  warning: Warning,
  code: Code,
  linkTool: LinkTool,
  image: Image,
  raw: Raw,
  header: Header,
  quote: Quote,
  marker: Marker,
  checklist: CheckList,
  delimiter: Delimiter,
  inlineCode: InlineCode,
  simpleImage: SimpleImage
}
import EditorJs from 'react-editor-js';
import { EDITOR_JS_TOOLS } from './tools'
<EditorJs data={data} tools={EDITOR_JS_TOOLS} />;

You can read more about plugins/tools at editor-js: Tools installation

How do I use custom element?

It's simpleeeee

render() {
  return (
    <EditorJs holder="custom">
      <div id="custom" />
    </EditorJs>
  );
}

How to access editor-js instance?

You can access using instanceRef

async handleSave() {
  const savedData = await this.editorInstance.save();
}

componentDidMount() {
  this.editorInstance // access editor-js
}

render() {
  return <EditorJs instanceRef={instance => this.editorInstance = instance} data={data} />
}

Haven't received data from server (when use Link)

You should set linkTool config. 💪🏻

import LinkTool from '@editorjs/link'

render() {
  <EditorJs
    data={data}
    tools={{
      linkTool: {
        class: LinkTool,
        config: {
          endpoint: 'http://localhost:8008/fetchUrl', // Your backend endpoint for url data fetching
        }
      }
    }}
  />
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].