Closed siamahnaf closed 1 month ago
@siamahnaf Hi, you need to add an Image extension anymore Refer playground demo: https://github.com/hunghg255/reactjs-tiptap-editor/blob/03c8cbca20869595018acb678e46a745e4f3b18a/playground/src/App.tsx#L104
Can you please give me two more answer?
content={value}
setting value to empty using state not clearing the content?Can you please give me two more answer?
- How to clear content?
content={value}
setting value to empty using state not clearing the content?
you can use ref from Editor
<RcTiptapEditor
ref={refEditor}
output='html'
content={DEFAULT}
onChangeContent={onValueChange}
extensions={extensions}
dark={theme === 'dark'}
disabled={disable}
/>
<button
onClick={() => {
refEditor.current?.editor?.commands?.clearContent();
}}
>
Empty
</button>
If you can add support for clearing content!
I am facing another problem on
ImageUpload
extensionFollowing is my full code-
Why ImageUpload button is disabled-
Where I am wrong?