-
-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editor wrapped in pre
?
#424
Comments
@amolpatel do you have any issue with editor reloading on state change ? |
@dukesx nope, I don't think so |
@amolpatel strangely , whenever i enter a value inside the editor, the damn thing just resets itself, like the state, its like the state change triggers it to reset for some reason |
Happening to me as well. @amolpatel what was the fix? |
@nickscamara You just need to re-render the <MDEditor
value={value}
onChange={(text) => onChange(text ?? "")}
components={{
textarea: (props) => {
return (
// @ts-ignore
<textarea {...props} />
);
},
}}
/> |
@amolpatel Thank you very much. That and upgrading to the latest version fixed. |
For some reason, the editor is wrapped in a pre and I can't find anywhere to disable that in the props. I'm using NextJS and tailwind. I followed the instructions on how to install using Next. Any help would be appreciated!
Rendered HTML:
React code:
The text was updated successfully, but these errors were encountered: