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: fix replace content params options
Wenzhao Huc2bbaaf03618
diff --git a/packages/docs/src/commands/commands/replace-content.command.ts b/packages/docs/src/commands/commands/replace-content.command.tsindex ade66dad8f..cdcdaaf248 100644--- a/packages/docs/src/commands/commands/replace-content.command.ts+++ b/packages/docs/src/commands/commands/replace-content.command.ts@@ -38,7 +38,7 @@ export const ReplaceContentCommand: ICommand<IReplaceContentCommandParams> = {type: CommandType.COMMAND,handler: async (accessor, params: IReplaceContentCommandParams) => {- const { unitId, body, textRanges, segmentId = '' } = params;+ const { unitId, body, textRanges, segmentId = '', options } = params;const univerInstanceService = accessor.get(IUniverInstanceService);const commandService = accessor.get(ICommandService);const textSelectionManagerService = accessor.get(TextSelectionManagerService);@@ -58,6 +58,7 @@ export const ReplaceContentCommand: ICommand<IReplaceContentCommandParams> = {const doMutation = getMutationParams(unitId, segmentId, docDataModel, prevBody, body);doMutation.params.textRanges = textRanges;+ options && (doMutation.params.options = options);const result = commandService.syncExecuteCommand<IRichTextEditingMutationParams,