Skip to content
SumOfficeSumOfficeSumOffice

Internal objects of the SumDoc application window

What's available inside the desktop SumDoc window, why you'd need it, and why the window's internal contract is not a public interface.

Object Purpose Example methods
window.fastdocShell Document, editor commands, state, save, menu getState(), getCurrentDocumentTruth(), openDocxPath(), onStateChanged()
window.a4Update Application updates status(), check(), start(), dismiss(), reveal(), openNotes(), onState()
window.a4Help Version and support version(), reportProblem(), supportBundle(), checkUpdates(), reportBadge(), onReportBadge()
window.a4Vizor Notes on the window’s built-in log: it lives in the tab’s memory for about a minute and only leaves together with the problem report onNote()

Examples inside the application’s own window

Section titled “Examples inside the application’s own window”
const state = await window.fastdocShell.getState();
const truth = await window.fastdocShell.getCurrentDocumentTruth();
const version = await window.a4Help.version();
const stopState = window.fastdocShell.onStateChanged((next) => {
console.log("document state", next);
});
const stopUpdate = window.a4Update.onState((next) => {
console.log("update state", next);
});
await window.a4Update.check();
// Be sure to unsubscribe when the component unmounts.
stopState();
stopUpdate();
  • Writing your own desktop app or a server-side wrapper — use fastdoc-cli serve with JSON-line exchange.
  • A shell built on web technologies that needs asynchronous exchange — use serve --ws 0.
  • Need to demonstrate embedding on the user’s machine — use the surface command with a WebView window or iframe; editing in this surface is limited to the first paragraph.
  • Your product lives in the browser and the core must run on the server — see editor in the browser.
  • Modifying the SumDoc application itself — the window’s internal contract, by separate agreement.

Documentation assistant

Answers are assembled from the documentation and may be inaccurate — check the sources.