Skip to main content
@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

The editor owns an internal scroll view (pinned toolbar, scrolling body) and fills its container — the parent element must give it a bounded height (e.g. a sized dialog body or h-[60vh]).

Props

Props mirror EditorMountOptions, 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 to setTheme
  • readOnly — forwarded to setEditable
Changing anything else (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.
string
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"
Events: @ready, @error. The template ref exposes setTheme(theme). As with the editor, only theme is live — remount (via :key) for anything else.

Imperative client operations

For mount-less operations (e.g. driving a document list view), the package re-exports the client: