@exalto/proof-embed
Proof's editor in your page, framed from Proof's own origin, and the presence settings. Your page gives it a document id and a way to get session tokens from your server; everything a person does in the editor goes straight to Proof.
npm install @exalto/proof-embed
import { mountEditor } from "@exalto/proof-embed";
const editor = mountEditor(document.querySelector("#editor"), {
document: "doc_8Hq2Lm4R",
getToken: async () => {
const response = await fetch("/proof/session?doc=doc_8Hq2Lm4R", { method: "POST" });
return (await response.json()).token;
},
});
Without a bundler, load https://embed.proof.exalto.ai/v1.js instead, which puts the same functions on window.Proof.