Laravel 11.24 Released: New Features Unveiled
Read More
Integrating TinyMCE with React is a breeze using our @tinymce/tinymce-react package. Here's a straightforward guide to setting up a project using React, TinyMCE, and the Create React App:
First things first, let's get the Create React App installed. It's a handy tool for quickly setting up React projects.
Just run this command:
Now, let's create a new project using the Create React App. We'll name it tinymce-react-demo.
Run:
Once it's done, navigate into the project directory:
Install the npm package and save it to your package.json with --save.
Run:
Auto-loading from TinyMCE Cloud: If TinyMCE isn't available globally, @tinymce/tinymce-react automatically loads TinyMCE Cloud. To avoid warnings, sign up for the cloud and use your API key like this:
Loading TinyMCE by yourself: If you prefer not to use TinyMCE Cloud, you'll need to make TinyMCE globally available yourself. This can be done by hosting tinymce.min.js or installing TinyMCE via npm.
Open the provided App.js file in the src directory and replace its content with the following code:
Fire up the development server provided with the Create React App.
Run:
6. Keep on leaning:
This guide gives you a simple start. For more complex configurations, refer to the React documentation and explore further.
That's it! You're all set to integrate TinyMCE with your React project. Happy coding!
Recent posts form our Blog
0 Comments
Like 1