[WIKI-654] fix: version history to load from html (#7754)

* fix: versions history to load from html

* chore: added json and stripped to store in version history (#7755)

---------

Co-authored-by: Bavisetti Narayan <72156168+NarayanBavisetti@users.noreply.github.com>
This commit is contained in:
M. Palanikannan 2025-09-09 19:26:19 +05:30 committed by GitHub
parent 49127ebeea
commit 99bc4262c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 3 deletions

View file

@ -2,7 +2,8 @@ import { observer } from "mobx-react";
import { useParams } from "next/navigation";
// plane imports
import type { TDisplayConfig } from "@plane/editor";
import { TPageVersion } from "@plane/types";
import type { JSONContent, TPageVersion } from "@plane/types";
import { isJSONContentEmpty } from "@plane/utils";
import { Loader } from "@plane/ui";
// components
import { DocumentEditor } from "@/components/editor/document/editor";
@ -77,7 +78,10 @@ export const PagesVersionEditor: React.FC<TVersionEditorProps> = observer((props
</div>
);
const description = versionDetails?.description_json;
const description = isJSONContentEmpty(versionDetails?.description_json as JSONContent)
? versionDetails?.description_html
: versionDetails?.description_json;
if (!description) return null;
return (