Skip to content

cooljameswei/React-Draft.js-editor-custom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started

This project used draft.js and customize some style after typing some keys

How to run

In the project directory, you can install packages using yran:

yarn install
yarn start

Open http://localhost:3000 to view it in the browser.

How this works

You might see this image once you run the app.

home

Note: There're two ways to set style not only clicking the button shown on the image

- To set the unset the Bold Style

You can set the Bold Style after typing "* and space" and unset typing again "* and space"

- Header Style

After typing "# and space" and unset typing again "# and space"

- Text Color to Red

After typing "** and space" and unset typing again "** and space"

- UnderLine Style

You can set the Bold Style after typing "*** and space" and unset typing again "*** and space"

- Save to LocalStorage

Cliking Save button will save content on editor to localstorage and won't disappear after you refer the page.

Result page look like this