Reputation: 45
I am using a React TextEditor package React Draft Wysiwyg.
Here is the implementation.
export default function TextEditor() {
const [editorState, setEditorState] = useState(() =>
EditorState.createEmpty()
);
const handleEditorState = editorState => {
setEditorState(editorState);
};
return (
<Editor
editorState={editorState}
toolbarClassName="toolbarClassName"
wrapperClassName="wrapperClassName"
editorClassName="editorClassName"
onEditorStateChange={handleEditorState}
/>
);
}
vite.config.js
plugins: [
laravel({
input: "resources/js/app.jsx",
ssr: "resources/js/ssr.jsx",
refresh: true,
}),
react(),
],
define: {
global: {},
},
And it run into an console error
Here is the original implementation article from Medium article
Upvotes: 0
Views: 773