• Stars
    star
    6,358
  • Rank 6,271 (Top 0.2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 8 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Wysiwyg editor build on top of ReactJS and DraftJS. https://jpuri.github.io/react-draft-wysiwyg

React Draft Wysiwyg

A Wysiwyg editor built using ReactJS and DraftJS libraries. Demo Page.

Build Status

Features

  • Configurable toolbar with option to add/remove controls.
  • Option to change the order of the controls in the toolbar.
  • Option to add custom controls to the toolbar.
  • Option to change styles and icons in the toolbar.
  • Option to show toolbar only when editor is focused.
  • Support for inline styles: Bold, Italic, Underline, StrikeThrough, Code, Subscript, Superscript.
  • Support for block types: Paragraph, H1 - H6, Blockquote, Code.
  • Support for setting font-size and font-family.
  • Support for ordered / unordered lists and indenting.
  • Support for text-alignment.
  • Support for coloring text or background.
  • Support for adding / editing links
  • Choice of more than 150 emojis.
  • Support for mentions.
  • Support for hashtags.
  • Support for adding / uploading images.
  • Support for aligning images, setting height, width.
  • Support for Embedded links, flexibility to set height and width.
  • Option provided to remove added styling.
  • Option of undo and redo.
  • Configurable behavior for RTL and Spellcheck.
  • Support for placeholder.
  • Support for WAI-ARIA Support attributes
  • Using editor as controlled or un-controlled React component.
  • Support to convert Editor Content to HTML, JSON, Markdown.
  • Support to convert the HTML generated by the editor back to editor content.
  • Support for internationalization.

Installing

The package can be installed from npm react-draft-wysiwyg

$ npm install --save react-draft-wysiwyg draft-js

Getting started

Editor can be used as simple React Component:

import { Editor } from "react-draft-wysiwyg";
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
<Editor
  editorState={editorState}
  toolbarClassName="toolbarClassName"
  wrapperClassName="wrapperClassName"
  editorClassName="editorClassName"
  onEditorStateChange={this.onEditorStateChange}
/>;

Docs

For more documentation check here.

Questions Discussions

For discussions join public channel #rd_wysiwyg in DraftJS Slack Organization.

Fund

You can fund project at Patreon.

Thanks

Original motivation and sponsorship for this work came from iPaoo. I am thankful to them for allowing the Editor to be open-sourced.

License

MIT.

More Repositories

1

draftjs-to-html

Library for converting Draftjs editor content state to HTML
JavaScript
315
star
2

draftjs-utils

An collection of useful utility functions for DraftJS.
JavaScript
285
star
3

html-to-draftjs

HTML
158
star
4

react-range-slider

React range slider component.
JavaScript
115
star
5

draftjs-to-markdown

JavaScript
62
star
6

GraphQL-Typescript-Starter

React Node GraphQL TypeScript - Starter Kit
TypeScript
44
star
7

react-component-stores

A simplified and powerful state management library for React applications.
JavaScript
21
star
8

react-simplified-boilerplate

A simplified boilerplate for my React projects
JavaScript
7
star
9

rustoli

Programming problems solved using Rust programming language
Rust
5
star
10

defi_yield_farming

DEFI yield farming dapp using chainlink price feeds
JavaScript
5
star
11

reason-places

A single page web application build using ReasonML
JavaScript
5
star
12

Solidity-Examples

Example solidity contracts
Solidity
3
star
13

solom

Articles about solidity
3
star
14

reason-tictactoe

Simple game of Tic Tac Toe made using ReasonML
OCaml
3
star
15

Election-DAPP

Election is simple DAPP which allow users to cast votes. It has some rules built on top of it like a user can cast only 1 vote, etc.
JavaScript
2
star
16

Runup

Runup token is implementation of ERC-20 token ground up (without using any library).
JavaScript
2
star
17

DaddaNFT

NFT minting
JavaScript
2
star
18

token_price_link

Obtaining latest token prices using chainlink blockchain
JavaScript
2
star
19

VR

VR and 2D Experiments
JavaScript
2
star
20

hub-poc

HTML
1
star
21

Learning-Reason

1
star
22

react-prosemirror

JavaScript
1
star
23

sanity-gatsby-blog

Blog with Gatsby
JavaScript
1
star
24

humble-site

CSS
1
star