Open Iulian-Dragomirescu opened 10 months ago
Hi, my code is like this:
import FroalaEditorComponent from "react-froala-wysiwyg"; import { Controller } from "react-hook-form"; // Load a plugin. import "froala-editor/css/froala_editor.pkgd.min.css"; import "froala-editor/css/froala_style.min.css"; import "froala-editor/js/plugins/char_counter.min.js"; import "froala-editor/js/plugins/colors.min.js"; import "froala-editor/js/plugins/font_size.min.js"; import "froala-editor/js/plugins/lists.min.js"; export default function Editor({ control, errors }) { let config = { heightMin: 300, placeholderText: `Edit Your Content Here!`, charCounterCount: true, }; return ( <> <Controller name="description" control={control} rules={{ required: true, }} render={({ field }) => ( <FroalaEditorComponent tag="textarea" config={config} model={field.value} onModelChange={field.onChange} /> )} /> </> ); }
And the miraculous error..
null ✓ Compiled in 1030ms (800 modules) ⨯ node_modules\react-froala-wysiwyg\index.js (1:321) @ eval ⨯ ReferenceError: window is not defined [...]
Any idea to fix this? Thanks!
Question answered on #212
Hi, my code is like this:
And the miraculous error..
Any idea to fix this? Thanks!