Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix(docs): insert footer (#3058)
Ran Luo14469e52c0b6
diff --git a/packages/docs-ui/src/commands/commands/doc-header-footer.command.ts b/packages/docs-ui/src/commands/commands/doc-header-footer.command.tsindex 613127e6aa..f6681afaf9 100644--- a/packages/docs-ui/src/commands/commands/doc-header-footer.command.ts+++ b/packages/docs-ui/src/commands/commands/doc-header-footer.command.ts@@ -66,7 +66,7 @@ function createHeaderFooterAction(segmentId: string, createType: HeaderFooterTyp// Also need to create an empty footer if you create a header, and vice versa. They are always created in pairs.const secondSegmentId = Tools.generateRandomId(ID_LEN);const insertPairAction = jsonX.insertOp([isHeader ? 'footers' : 'headers', secondSegmentId], {- [isHeader ? 'footers' : 'headers']: secondSegmentId,+ [isHeader ? 'footerId' : 'headerId']: secondSegmentId,body: getEmptyHeaderFooterBody(),});actions!.push(insertPairAction!);