Closed breneser closed 4 years ago
Hi @breneser,
Yep, Draftail is React only. You can technically use it in an app / site that’s otherwise not built with React, but there are many other rich text editors that are more suited to scenarios like this. Draftail is a contenteditable
(like most/all modern rich text editors), so it’s also not meant to be used with a textarea.
I’m surprised you didn’t manage to figure this out for yourself – searching "without React" in the docs’ search form, the first result I covers this very dependency: https://www.draftail.org/docs/getting-started#why-we-need-draftjs-and-react.
Hi @thibaudcolas
Thanks for the answer. Can't believe I missed that :) I definitely searched, even searched Github repo. Also skimming through docs I saw the code and realised that's a React code example and didn't check whole of that page and quickly skipped to other pages :)
Definitely my bad, appreciate the response.
That’s alright, don’t worry about it 👌 I took a bit of time to set up this issue template with prompts to check other sources, so I appreciate that you took the time to use it – and if someone else is looking for the same info in the future, then now there is one more occasion to find it.
Searching through documentation to try and get Draftail work with a simple html TextArea but nothing on the documentation. I had impression Draftail was to be used as a React.js library, but not entirely sure.
How can I get Draftail fire up on a simple html page to edit a text area?
Below page embeds the editor as an iframe ? I suspect the library maybe is not what I am looking for but I was suggested to use this. Want to make sure I am not getting this all wrong.
Thanks for you help.
https://www.draftail.org/docs/formatting-options
Which terms did you search for in the docs, issues, Stack Overflow?