Add title emoji support in JSON import/export (#6660)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user