Page builder
Not everyone wants to connect a website to an API. Build pages from widgets, then show them on your own website or send a private link. Available on SharpWrite Cloud.
Pages and content together
Pages and content live in one place, Contents in the menu. There is no mode to choose, and you can use both on the same site:
- Pages: you build pages from widgets and publish them in SharpWrite, then show them on your own website or share them with a private link.
- Content: your own kinds of content, such as posts or products, which your website reads through the API.
Pages are available as JSON too, so you can also build your own site from them. Read them from the same API as everything else, with the type site-pages: GET /api/public/v1/site-pages lists the published pages, and GET /api/public/v1/site-pages/{slug} returns one. Each page holds its title, description and widgets. AI agents can read and write page drafts through MCP in the same way.
Show a page on your own website
First prove the website is yours, then paste two lines into any website, CMS or page builder that allows a script tag, and the page appears there:
<div data-sharpwrite data-page="about"></div>
<script src="https://app.sharpwritecms.com/embed.js" data-key="swk_..." async></script>data-keyis your site key. It goes once, on the script line, and serves every element on the page.data-pageis the page address; leave it out for the homepage.- Add
data-theme="dark"for a dark background. - The Pages screen in SharpWrite gives you the snippet ready to copy, with your key in it, once a page is published.
- Verify your website first. On the Pages screen, add the address of your website (each address you use, with and without
www, separately). SharpWrite gives you a short token: put it in a<meta name="sharpwrite-verify" content="...">tag on your homepage, or in a file at/.well-known/sharpwrite.txt, then press Verify. Pages are only sent to websites that passed this check; on any other website the element shows an error instead. If you remove the proof and check again, the website is no longer verified. - The key is safe to put in a web page, because only your verified websites can use it. If it ever ends up somewhere it should not, press Replace key on the Pages screen: the old key stops working at once, and you paste the new snippet.
- Only published pages appear, and visitors always get the latest published version. A draft or an unpublished edit is never shown.
- The page is drawn inside its own sealed box, so your site's styles cannot break it and it cannot break yours. It takes its font from the surrounding page. Nothing from the page is ever run as code.
- The element gets
data-sharpwrite-state(loading,readyorerror) and firessharpwrite:loadedorsharpwrite:error. In a single-page app, callwindow.SharpWrite.render(element)after adding an element. - Prefer to draw it yourself? Read pages as JSON from the API instead. The embed address (
/api/embed/{key}/{page}) is for the script and answers only verified websites.
Widgets
A page is a list of widgets that you add, fill in and reorder. Drag to reorder, or duplicate and delete a widget from its menu. A page can have up to 60 widgets.
| Widget | What it is for |
|---|---|
| Hero | Headline, sub-headline, a button and an optional image at the top of a page |
| Heading | A section heading (level 2 or 3) |
| Text | A block of paragraph text |
| Image | A picture from your media library with alt text and an optional caption |
| Features | A short list of up to six titled points |
| FAQ | Up to twelve questions and answers |
| Quote | A testimonial with author and role |
| Call to action | A headline, a line of text and a button |
| Divider | Space between sections (small, medium or large) |
Buttons and links accept https://, http://, mailto: addresses, a path on your site such as /pricing, or an anchor such as #faq. Anything else is refused. Images come from your media library or an https:// address.
Preview on tablet and phone
The builder shows a live preview and lets you switch between desktop, tablet and phone widths while you work, so you can see how a page looks before anyone else does.
Style a widget
Select a widget and scroll to Style in the panel. Every widget can be adjusted, and pages built before these options existed look exactly as they did.
| Option | What it does |
|---|---|
| Alignment | Left, center or right: the text of a hero, heading, text, quote or call to action; the title of features and FAQ; the position of a picture. |
| Background colour | Colours the band behind the widget, edge to edge. A hero or call to action drops its tinted card so your colour shows. If you pick a background but no text colour, the text turns light or dark on its own so it stays readable. |
| Text colour | Colours all the text in the widget, including the muted supporting lines. |
| Accent colour | Button colour (hero and call to action), link colour (text), line colour (divider) and the plus sign (FAQ). Button text picks light or dark to stay readable. |
| Space above and below | None, small, normal, large or extra large. |
| Content width | Narrow, normal, wide or full width. |
- Pick a colour with the colour picker, type a hex code such as
#1a2b3c, or use one of the swatches. Reset puts the usual colour back. - A colour is always a plain hex code. Anything else (a name like "red",
rgb(), or any other text) is refused, so a page can never carry style rules, even through the API or MCP. - The panel warns you when the text would be hard to read on its background.
- The same style shows in the builder, on a share link and on your own website through the embed. AI agents can set it too:
align,bgColor,textColor,accentColor,spaceandwidthon any widget.
Draft and published copies
Every page keeps a draft and a published copy. Saving changes the draft only; the live page does not change until you publish. If someone saved a newer version while you were editing, SharpWrite refuses to overwrite it and asks you to reload, so work is not lost silently.
Why pages cannot carry scripts
Widgets are structured data, not raw HTML. Every value is plain text, a checked link or a checked image address, and it is escaped when the page is shown. A page cannot contain a script, whoever edits it.
Who can build pages
Owners, Admins and Editors can create, edit and publish pages. Viewers cannot change them. See Team and roles.