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
feat(docs-ui): export switch mode command (#5108)
ZhangWei786c5a76cc37
diff --git a/packages/docs-ui/src/commands/commands/switch-doc-mode.command.ts b/packages/docs-ui/src/commands/commands/switch-doc-mode.command.tsindex 5eff547c1b..9ef101bfec 100644--- a/packages/docs-ui/src/commands/commands/switch-doc-mode.command.ts+++ b/packages/docs-ui/src/commands/commands/switch-doc-mode.command.ts@@ -29,7 +29,7 @@ export const SwitchDocModeCommand: ICommand<ISwitchDocModeCommandParams> = {type: CommandType.COMMAND,// eslint-disable-next-line max-lines-per-function, complexity- handler: async (accessor) => {+ handler: (accessor) => {const commandService = accessor.get(ICommandService);const renderManagerService = accessor.get(IRenderManagerService);const docSelectionManagerService = accessor.get(DocSelectionManagerService);diff --git a/packages/docs-ui/src/index.ts b/packages/docs-ui/src/index.tsindex 3749a76664..6bd5f55b2b 100644--- a/packages/docs-ui/src/index.ts+++ b/packages/docs-ui/src/index.ts@@ -59,6 +59,7 @@ export { whenDocAndEditorFocused } from './shortcuts/utils';export { DOC_VERTICAL_PADDING } from './types/const/padding';// #region - all commands+export { SwitchDocModeCommand } from './commands/commands/switch-doc-mode.command.js';export { HorizontalLineCommand } from './commands/commands/doc-horizontal-line.command';export { AfterSpaceCommand, EnterCommand, type ITabCommandParams, TabCommand } from './commands/commands/auto-format.command';export { BreakLineCommand } from './commands/commands/break-line.command';