|
@@ -87,6 +87,7 @@ const PageEditor = React.memo((): JSX.Element => {
|
|
|
const { mutate: mutateIsEnabledUnsavedWarning } = useIsEnabledUnsavedWarning();
|
|
const { mutate: mutateIsEnabledUnsavedWarning } = useIsEnabledUnsavedWarning();
|
|
|
const saveOrUpdate = useSaveOrUpdate();
|
|
const saveOrUpdate = useSaveOrUpdate();
|
|
|
|
|
|
|
|
|
|
+
|
|
|
const currentRevisionId = currentPage?.revision?._id;
|
|
const currentRevisionId = currentPage?.revision?._id;
|
|
|
|
|
|
|
|
const initialValue = useMemo(() => {
|
|
const initialValue = useMemo(() => {
|
|
@@ -127,6 +128,11 @@ const PageEditor = React.memo((): JSX.Element => {
|
|
|
|
|
|
|
|
}, [markdownToPreview, mutateIsConflict]);
|
|
}, [markdownToPreview, mutateIsConflict]);
|
|
|
|
|
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
|
+ markdownToSave.current = initialValue;
|
|
|
|
|
+ setMarkdownToPreview(initialValue);
|
|
|
|
|
+ }, [initialValue]);
|
|
|
|
|
+
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
if (socket == null) { return }
|
|
if (socket == null) { return }
|
|
|
|
|
|