Developing Apps & Plugins
Build fullscreen apps and library plugins using the DA App SDK and PostMessage API.
The DA App SDK lets you extend Document Authoring with your own custom apps, rather than being limited to what ships out of the box. Apps run inside DA as fully authenticated, sandboxed pages, with a postMessage-based bridge handling the secure exchange of data between DA and your code.
What you need
- A hosted site, e.g.
https://main--geometrixx--aemsites.aem.live - A dedicated page for the app, e.g.
/tools/tags.html - A script driving that page, e.g.
/tools/tags/tags.js
Building a fullscreen app
Import the SDK as a module in the page's <head>, alongside your own script:
<script src="https://da.live/nx/utils/sdk.js" type="module"></script>
<script src="/tools/tags/tags.js" type="module"></script>The SDK module exports three things your app code consumes: context (details about the current org/site/user), token (an auth token you can attach to your own API calls), and actions (a set of methods for talking back to DA).
In production, DA rewrites the raw codebase URL into an obfuscated one — https://main--geometrixx--aemsites.aem.live/tools/tags.html becomes https://da.live/app/aemsites/geometrixx/tools/tags. While building, you can target a feature branch with a ref={branch-name} query param, or ref=local to point at a codebase running on localhost:3000.
Building a library plugin
Library plugins use the same page/script setup as a fullscreen app, but run inside the document library panel and call extra actions to affect the open document instead of a standalone view:
actions.sendText(text)— insert plain text at the cursoractions.sendHTML(html)— insert richer markup at the cursoractions.closeLibrary()— dismiss the library panel
Registering the app
Apps are discovered through a project's config, not hardcoded — add a sheet named apps at https://da.live/config#/{ORG}/{SITE}/ with columns title, description, image, path, and ref. Once saved, the app shows up at https://da.live/apps#/{ORG}/{SITE}/, or can be opened directly at https://da.live/app/{ORG}/{SITE}/{PATH}.
Read more
Full reference: docs.da.live/developers/guides/developing-apps-and-plugins.