Revert "Warn whenever rich text editor has unsaved changes"
This reverts commit 419219c703
.
This commit is contained in:
parent
6f41ab8efd
commit
730abf584a
|
@ -42,7 +42,6 @@ import ItalicIcon from 'web/lib/icons/italic-icon'
|
||||||
import LinkIcon from 'web/lib/icons/link-icon'
|
import LinkIcon from 'web/lib/icons/link-icon'
|
||||||
import { getUrl } from 'common/util/parse'
|
import { getUrl } from 'common/util/parse'
|
||||||
import { TiptapSpoiler } from 'common/util/tiptap-spoiler'
|
import { TiptapSpoiler } from 'common/util/tiptap-spoiler'
|
||||||
import { useWarnUnsavedChanges } from 'web/hooks/use-warn-unsaved-changes'
|
|
||||||
|
|
||||||
const DisplayImage = Image.configure({
|
const DisplayImage = Image.configure({
|
||||||
HTMLAttributes: {
|
HTMLAttributes: {
|
||||||
|
@ -151,9 +150,6 @@ export function useTextEditor(props: {
|
||||||
editor?.setEditable(!disabled)
|
editor?.setEditable(!disabled)
|
||||||
}, [editor, disabled])
|
}, [editor, disabled])
|
||||||
|
|
||||||
const isEditorFilled = editor != null && !editor.isEmpty
|
|
||||||
useWarnUnsavedChanges(isEditorFilled)
|
|
||||||
|
|
||||||
return { editor, upload }
|
return { editor, upload }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user