Skip to main content
The renderer shows a document without editing. Mount it with client.mountRenderer(el, options). Unlike the editor, the renderer’s auth is per read and supplied on the mount call — the client only lends its apiUrl.
qirtaas.mountRenderer("#viewer", {
  documentId: "b1f2…",
  shareToken: "…",
  theme: "light",
  onReady: () => console.log("rendered"),
});

Auth modes

Supply exactly one auth source:
shareToken
string
Public read: an existing share token that resolves the document by token.
getToken
() => Promise<string> | string
Own-document read: returns a short-lived embed token (the same kind the editor uses).
getSignature
() => Promise<{ signature: string; exp: number }>
Cross-user read (enrolment-gated): returns a per-document HMAC signature and its expiry.

RendererMountOptions

documentId
string
Document to render. With shareToken, the token resolves the document.
locale
"en" | "ar"
theme
"light" | "dark"
onReady
() => void
onError
(code: ErrorCode, detail?: unknown) => void
Fired on errors with a stable error code.

RendererInstance

setTheme(theme)
void
Switch theme live.
destroy()
void
Tear down the renderer. Call this on unmount.

Example: public share view

const viewer = qirtaas.mountRenderer("#viewer", {
  shareToken: new URLSearchParams(location.search).get("t")!,
  theme: "light",
});

window.addEventListener("beforeunload", () => viewer.destroy());