With The Help Of TipTap This is A ready Use Component with the Ablity To Customuize Apperance & Editor Actions
- For Devlopment ReactJS is Used
- Styled In TailwindCSS for Better Usage
- The Core Editor Functinallity Is Powered With TipTap Library
<Editor
content={editorContent} // Passing the UseState to The Editor
setContent={setEditorContent} // Passing setState to Editor
/>
<button
onClick={() => console.log(editorContent)} // Any Action to be Taken with the editor Data will Be out Of teh Component Like Console it
>
console content
</button>
For View The Data in the Page As It's is an HTML data Not Text so it will be Diffrent
<div dangerouslySetInnerHTML={{ __html: /* data will be Added here as it's HTML data */ }} />
Editor's Data is Better to be Hold IN a private State Not inside Object state
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.