In this article, we're going to learn how to "Integrate A Rich Text Editor" in your react.Js project using TinyMCE.
Before we begin, let's do a qu...
For further actions, you may consider blocking this person and/or reporting abuse
Good work. Just a reminder don't store your API key in your React App, save it in environment file like .env.local or .env.production as
REACT_APP_TINYMCE_API_KEY=your-api-key-here
and retrieve it by using
process.env.REACT_APP_TINYMCE_API_KEY
in your react App.I think as long as those API keys are public keys those are fine.
Also note that you cannot hide API keys on FrontEnd because they will be included anyways in the production build
create-react-app.dev/docs/adding-c...
Just don't store any SECRET_KEYs in frontend
Good advice, but please don't believe that they are secured when you store them in env vars. They're still part of the JavaScript code delivered to the browser, and hence can be viewed by anybody, e.g. via DevTools.
This is something I need to remember to do. I have to refactor my repos on GitHub to remove them
Wow ! Real helpful feedback. I'll be sure to do that. Thanks for this 🙏🏽💯
Does it apply for next.js applications as well?I'm using it in a next js project.
Hi,
Not so sure, currently the supported integrations are for Angular.js, Angular4+, Bootstrap, jQuery, Rails, Swing, WordPress, Vue, and React.js,
but you can keep an eye out: tiny.cloud/docs/integrations/
Wow! This is really helpful
Happy to help.
Thanks. Happy to help 😊
Great
That's really cool. Can't wait to try this out.
Anytime. Thanks for the feedback
Worked for me.... thank you Emmanuel fir sharing this.... ✌️✌️✌️😇😇
Happy to help sir 😎!
I love your works sir. Keep up the good work
Thanks
A really descriptive one. Trying out today for one of my pet Project. Just curious, how do you compare this with Facebook’s Draft.js? Have you tried that?
I haven't tried Draft.js (tho I've read a little about it). Also, I know they've got a lot of users.
Here's a link to the article I read about Draft.Js:
medium.com/@hadijah315/how-to-add-...
Thanks For the feedback 💯
Very great work. Thanks
Happy to help 😎.
Good Job keep up the good work bro.. So proud of you Emmaccen💯
Thanks, Ali. Appreciate 🙏🏽💯
Love this😍😍
Thanks !
nice work.
Thanks. Appreciate the feedback.
wow you give unique insights, remarkable work , I want to suggest you also do a vlog or you tube cos this would help alot out there. Thank you and well done again
how to send data using tinymce,WYSIWYG through API ...?
Hi, "Asitsi".
One way to do this is :
If you go over the code snippets I provided in the article, you'd notice a
handleEditorChange
function.So with this function, you can grab the values using the
e.target.getContent()
and store the value in SetState after which you can then access the stored values and send to your API.Let me know if this helps, thanks.