springload / draftail

📝🍸 A configurable rich text editor built with Draft.js

Home Page:https://www.draftail.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example of using Draftail without React

jkevingutierrez opened this issue · comments

Is your proposal related to a problem?

https://www.draftail.org/docs/getting-started#usage-without-react said that Draftail can be used in projects that don't use React. It would be good to have an example to have a little sense of how to do that.

Describe the solution you’d like

Add a little example of the usage of Draftail without React on the documentation.

Hey @jkevingutierrez, as that page mentions Draftail itself needs React. You can set it up as described on the page – it doesn’t assume anything about your codebase beyond having the dependencies installed as described on the page.

Hi @thibaudcolas thanks for your response, I was asking cause it also says

While Draftail depends on React, it’s perfectly possible to use it in a project that otherwise doesn’t use React.

But the set up and examples always use react.

If you can't use Draftail without React, it would be a good idea to remove that section then: https://www.draftail.org/docs/getting-started#usage-without-react

Thanks!

Thanks for the feedback but I’m not sure I agree. I’ve added this specifically because people were asking whether it was possible to use Draftail on projects that don’t use React, and the answer is yes, but you of course have to install it at least for Draftail, since Draftail depends on it.

I’ll see if I can find a way to rephrase this, or maybe add an example as you mentioned.