@qirtaas/vue wraps @qirtaas/core’s mount API in two
components: <QirtaasEditor> and <QirtaasRenderer>. Vue 3 is a peer
dependency — the wrapper shares your app’s Vue.
QirtaasEditor
Props
Props mirrorEditorMountOptions, plus the
connection config (the wrapper creates its client internally):
() => Promise<string> | string
required
Returns a short-lived embed token. Called on init, before expiry, and on
401. See Authentication.string
default:"https://api.qirtaas.io"
Qirtaas API base URL.
string
Existing document to load. Omit to lazy-create on first edit (the
documentCreated event delivers the new id).Json | null
Initial content (TipTap JSON) when not loading from a
documentId."en" | "ar"
"light" | "dark"
boolean
default:"false"
boolean
AutosaveOptions
See Types. Set
{ enabled: false } and call
save() on the template ref to drive persistence yourself.Events
Each editor callback is emitted as a Vue event:Live updates vs. remount
The component mounts the editor once (onMounted). Only two props are
watched after mount:
theme— forwarded tosetThemereadOnly— forwarded tosetEditable
documentId, getToken, locale, …) requires a
remount — give the component a :key that changes with them:
Exposed methods
Available on the template ref:Json | null
Current editor content (TipTap JSON).
Promise<void>
Force an immediate save of pending changes.
void
void
QirtaasRenderer
Read-only display. Supply exactly one auth source —share-token,
get-token, or get-signature (see Renderer auth modes).
Props
string
default:"https://api.qirtaas.io"
string
Document to render. With
shareToken, the token resolves the document.Public read.
() => Promise<string> | string
Own-document read (embed token).
() => Promise<{ signature: string; exp: number }>
Cross-user read (per-document HMAC signature).
"en" | "ar"
"light" | "dark"
@ready, @error. The template ref exposes setTheme(theme). As with
the editor, only theme is live — remount (via :key) for anything else.
