@siteme/editor
v0.1.0
Published
Thin browser client that mounts the SiteMe Partner embed editor
Maintainers
Readme
@siteme/editor
Thin browser client that mounts the hosted SiteMe Partner editor in an iframe.
Never pass an API key to this package. Mint a short-lived embed_url on your backend with @siteme/sdk or the Python siteme package, then hand only that URL to the browser.
Full guide (including an agent implementation brief): sdks/EDITOR.md
npm install @siteme/editorimport { mount } from "@siteme/editor";
const editor = mount(document.getElementById("editor"), {
embedUrl, // from your backend embed-session response
theme: { primary: "#0f766e", mode: "light", radius: "10px" },
onReady: ({ site_id }) => console.log("ready", site_id),
onEdited: ({ prompt_count }) => console.log("edited", prompt_count),
onError: ({ message }) => console.error(message),
});
// later
editor.setTheme({ mode: "dark" });
editor.destroy();