Add title emoji support in JSON import/export (#6660)

This commit is contained in:
Tom Moor
2024-03-10 21:09:44 -06:00
committed by GitHub
parent 9f55645655
commit ac4166da28
4 changed files with 4 additions and 1 deletions

View File

@@ -123,6 +123,7 @@ export default class ExportJSONTask extends ExportTask {
id: document.id,
urlId: document.urlId,
title: document.title,
emoji: document.emoji,
data: DocumentHelper.toProsemirror(document),
createdById: document.createdById,
createdByName: document.createdBy.name,

View File

@@ -79,6 +79,7 @@ export default class ImportJSONTask extends ImportTask {
// TODO: This is kind of temporary, we can import the document
// structure directly in the future.
text: serializer.serialize(Node.fromJSON(schema, node.data)),
emoji: node.emoji,
createdAt: node.createdAt ? new Date(node.createdAt) : undefined,
updatedAt: node.updatedAt ? new Date(node.updatedAt) : undefined,
publishedAt: node.publishedAt ? new Date(node.publishedAt) : null,

View File

@@ -60,7 +60,7 @@ export type StructuredImportData = {
id: string;
urlId?: string;
title: string;
emoji?: string;
emoji?: string | null;
/**
* The document text. To reference an attachment or image use the special
* formatting <<attachmentId>>. It will be replaced with a reference to the

View File

@@ -465,6 +465,7 @@ export type DocumentJSONExport = {
id: string;
urlId: string;
title: string;
emoji: string | null;
data: Record<string, any>;
createdById: string;
createdByName: string;