Open lintonpinto opened 3 years ago
I'm having the same issue, does someone find any solution for this? Thanks
I fixed it with ` onBlur={(newContent) => setEditorText(newContent)}``
I fixed it with ` onBlur={(newContent) => setEditorText(newContent)}``
Hey, i did the same but it is not working for me, can you please let me know what is newContent and setEditorText here.
I fixed it with ` onBlur={(newContent) => setEditorText(newContent)}``
Hey, i did the same but it is not working for me, can you please let me know what is newContent and setEditorText here.
const [editorText, setEditorText] = useState<string>("");
"newContent" = What we got from JoditEditors onBlur func.
I resolved this issue by using a ref
for the JoditEditor instance. Instead of relying solely on the component's internal state, I created a useRef
hook to directly access the editor instance. This gives React better control over Jodit’s state, preventing issues when interacting with media elements like deleting media files.
const editor = useRef<Jodit | null>(null);
<JoditEditor
ref={editor}
value={content}
config={config}
onBlur={(newContent) => setJournalText(newContent)}
/>
Hi guys, I'm getting this TypeError when I delete images using the backspace / delete key.
Steps to replicate:
Delete
orBackspace
buttonI'm using React with Next.js
Would really appreciate any suggestions or help. Thanks