跳到主要内容

TEditorCustomization

Editor customization options passed via TFrameConfig.editorCustomization. Controls the editor UI: toolbar, menus, macros, theme, and zoom. Only applies to SDKMode.Editor and SDKMode.Viewer modes.

type TEditorCustomization = object;

Example​

sdk.init({
mode: "editor",
editorCustomization: {
compactToolbar: true,
hideRulers: true,
uiTheme: "Dark",
},
...
});

Properties​

PropertyTypeDescription
anonymousTEditorAnonymousAnonymous user settings. See TEditorAnonymous.
autosavebooleanEnable "Autosave" menu option. When false, only "Strict" co-editing mode is available. Default: true.
commentsbooleanShow "Comments" button. When false, comments are view-only. Default: true.
compactHeaderbooleanMove action buttons from header to toolbar, making the header compact. Default: false.
compactToolbarbooleanUse compact toolbar layout. Default: false (edit mode), true (view mode since v8.3).
compatibleFeaturesbooleanRestrict features to OOXML-compatible only (e.g. no whole-document comments). Default: false.
forcesavebooleanEnable force-save on manual "Save" click. Default: false.
helpbooleanShow "Help" button. Default: true.
hideRightMenubooleanCollapse the right panel on first load. Unset by default: the editor keeps its own behaviour.
hideRulersbooleanHide rulers. Available for document and presentation editors. Default: false (documents), true (presentations).
integrationMode"embed"Integration mode. Set to "embed" to prevent auto-scroll to the editor frame on load.
macrosbooleanEnable macros auto-run. false disables macros entirely (since v9.0.3). Default: true.
macrosMode"disable" | "warn" | "enable"Macros auto-run policy. Default: "warn".
mentionSharebooleanMention hint behavior. true = user gets notification + access; false = notification only. Default: true.
mobileForceViewbooleanOpen mobile editor in view/edit mode on launch. Default: true.
pluginsbooleanEnable plugins. Default: true.
toolbarHideFileNamebooleanHide document title on the top toolbar. Default: false.
toolbarNoTabsbooleanUse flat (highlighted) toolbar tabs instead of distinct tabs. Default: false.
uiThemeTThemeEditor color theme: a Theme value; any other string falls back to "System". Unset by default: the editor follows TFrameConfig.theme.
unit"cm" | "pt" | "inch"Ruler/dialog measurement units. Default: "cm".
zoomnumberZoom percentage. > 0 for explicit zoom, -1 = fit to page, -2 = fit to width. Default: 100.