DocumentationSDK on GitHub

Documentation Reference

Editor settings

Configure the authoring experience and connect saving, personalization and delivery to your application.

On this page

Documentation

In the dashboard, open an editor’s settings. Use the info button beside a setting for help. Save the editor to apply your changes.

Display conditions

Offer named rules that let authors show a section or complete column layout to selected recipients. Define the rules here, then select a layout in the editor and choose Show when in its block options.

Use the opening and closing syntax your sending platform understands. The example below uses Liquid; replace it with your own platform’s syntax. Weavour preserves these strings without evaluating them.

  • ID is a stable identifier, such as free_account. Name appears in the rule chooser; optional category and description help authors choose.
  • Add up to 100 definitions. Both syntax fields are required. Use templating directives rather than HTML tags.
  • Nested layouts require every parent rule to match. Conditions in desktop/mobile Scenario previews are sample outcomes; they do not change normal exports.
  • Before delivery, evaluate the exported syntax in your sending system, or call the saved-document render endpoint with boolean conditionValues keyed by rule ID. Supply an outcome for each reachable rule.
  • Keep complete onDocumentChange envelopes and reopen with emailDocument. Conditional documents require schemaVersion: 2, SDK 0.1.6 and a compatible hosted editor.
typescript
editor.updateConfig({
  displayConditions: [{
    id: 'free_account', label: 'Free accounts', category: 'Account',
    before: "{% if account.plan == 'free' %}", after: '{% endif %}',
  }],
});
const output = await editor.exportHTML();
// Evaluate the host syntax before delivering HTML and plain text.
console.log(output.displayConditions, output.displayConditionIssues);
// Persist onDocumentChange envelopes; reopen with emailDocument.

Merge tags

Define placeholders for recipient-specific text and links, such as a first name or an account URL. Authors insert named tags without typing your platform’s syntax.

  • Give each tag a stable ID, a readable name and the exact token your sending system expects.
  • Choose Text for inline content, or URL for a destination. Use description and sample value to explain a tag and illustrate its preview.
  • Saved and SDK definitions merge by ID. Existing inserted tags retain their literal syntax through saving and export.
  • Resolve tokens with recipient values in your sending workflow, or provide mergeValues to the saved-document render endpoint.
typescript
// Run on your mounted editor instance.
editor.updateConfig({
  mergeTags: [
    { id: 'first_name', label: 'First name', token: '{{first_name}}', kind: 'text', sampleValue: 'Alex' },
    { id: 'account_url', label: 'Account URL', token: '{{account_url}}', kind: 'url', sampleValue: 'https://example.com/account' },
  ],
});

const output = await editor.exportHTML();
console.log(output.mergeTags, output.mergeTagIssues);
// Exports retain literal tokens. Resolve recipient values before delivery.

Autosave and drafts

Enable hosted autosave to keep drafts and version history in Weavour. If you disable it, your application must save the complete versioned document itself.

  • Store the returned draftId on your application record. Reopen it with the same editor key, userId and organizationId scope.
  • Pass draftId on its own when resuming; do not combine it with initial content or emailDocument.
  • Await flushAutosave() and handle failures before navigating away, then call destroy(). A content-change callback or HTML export does not confirm a save.
  • Version history retains 30 days. Restoring a version creates a new version.

Organization blocks

Let authors save a complete layout as a reusable block for their organization. A block can include nested layouts, images and display conditions.

  • Supply both userId and organizationId at mount to use the organization block library.
  • Organization IDs are namespaces inside your customer workspace. Reuse the same ID for editors that serve the same organization.
  • Inserted blocks become independent email copies. Editing a library block does not change existing emails.
  • Workspace administrators manage saved blocks from Organization blocks in the dashboard.

Templates

Enable the template chooser so authors can start from included, workspace or user-created templates available in their scope.

  • Workspace administrators manage templates and publish them to all organizations or selected organizations.
  • User templates begin private to their organization/user pair, or to the user in a personal context. Organization sharing is an explicit choice.
  • Starting an email from a template makes an independent copy. Editing the source requires the relevant permission and its Save template action.
  • Disabling the chooser preserves the current email and saved templates.

Email audit

Show a live content rating and actionable findings below the canvas. Authors can open the report and navigate to issues while editing.

  • Checks cover authored content, accessibility, images, links and common email-rendering risks.
  • Auditing runs without AI. Its controls and rating stay outside the exported email.
  • Disabling audit stops background checks and hides the audit controls without changing the email.
  • Test the final personalized email in your target email clients before sending.

Available blocks

Choose the content and layout tools authors can insert into new emails. Keep the palette focused on your application’s workflow.

  • Selections filter the insertion palette. Deselect every block to hide all palette entries.
  • Changing the list does not delete existing blocks from saved emails.
  • Explicit SDK allowedBlocks preferences override the saved selection. Omit the preference to use dashboard defaults.

Appearance and language

Match the embedded editor’s controls to your application using its theme, colors, font, density and corner radius. Use the live preview to check the result.

  • Start with light or dark mode, then customize individual colors. Keep text, controls and focus indicators readable.
  • The language setting controls the editor interface. Authors can still write their email in another language.
  • Appearance updates preserve the draft and email design. SDK theme overrides take precedence and can be updated live.
Need help? Contact us