tiptap: fix render doc

This commit is contained in:
fantasticit 2022-08-08 19:09:52 +08:00
parent 7685ca4be3
commit a066a14537
1 changed files with 4 additions and 6 deletions

View File

@ -36,15 +36,13 @@ export const useEditor = (options: Partial<EditorOptions> = {}, deps: Dependency
setEditor(instance);
if (!options.editable) {
instance.on('transaction', () => {
instance.on('transaction', () => {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
forceUpdate();
});
forceUpdate();
});
});
}
});
return () => {
instance.destroy();