rsnext/examples/with-draft-js
Joe Haddad 7d038dfef1
Suggest npx over npm init (#13637)
This updates old examples to the more universal `npx` command.

Fixes https://github.com/vercel/next.js/discussions/12103
2020-06-01 17:36:57 +00:00
..
pages More redundant imports @ examples (#13190) 2020-05-22 15:33:04 +00:00
package.json [Examples] Update draft-js to v0.11.5 and add editorKey prop i… (#12011) 2020-04-20 11:05:09 +02:00
README.md Suggest npx over npm init (#13637) 2020-06-01 17:36:57 +00:00

DraftJS Medium editor inspiration

Have you ever wanted to have an editor like medium.com in your Next.js app? DraftJS is available for SSR, but some plugins like the toolbar are using window, which does not work when doing SSR.

This example aims to provides a fully customizable example of the famous medium editor with DraftJS. The goal was to get it as customizable as possible, and fully working with Next.js without using the react-no-ssr package.

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Using create-next-app

Execute create-next-app with npm or Yarn to bootstrap the example:

npx create-next-app --example with-draft-js
# or
yarn create next-app --example with-draft-js with-draft-js-app

Download manually

Download the example:

curl https://codeload.github.com/vercel/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-draft-js
cd with-draft-js

Install it and run:

npm install
npm run dev
# or
yarn
yarn dev

Deploy it to the cloud with Vercel (Documentation).