Add an Edit button to your website

Let your visitors edit a photo, video, document, spreadsheet, presentation, PDF, drawing or recording without leaving your site and without a Culacc account. They press Edit, a Culacc window opens over your page, they pick an app, and the result is saved in your Culacc storage and sent back to your page and your server.

The apps your visitors can use

AppForOpens
Image editorquick crops, rotate, brightnessJPG, PNG, WebP, GIF, AVIF
PhotoCraftlayers, masks, brushes (Photoshop-style)PNG, JPG, WebP
LightCraftlight and colour (Lightroom-style)JPG, PNG, TIFF, WebP
VectorCraftvector drawingsSVG, PDF
PdfCraftcombine, fill in, sign, commentPDF
WordCraftdocumentsDOCX, DOC, ODT, RTF
GridCraftspreadsheetsXLSX, XLS, ODS, CSV
DeckCraftpresentationsPPTX
CADCraftCAD drawingsDXF, DWG
DesignCraftpage layout (InDesign-style)IDML, INDD
SoundCraftaudio: cut, fade, many tracksWAV, MP3, FLAC, OGG, M4A
Video trimmertrim and crop videoMP4, MOV, WebM
Google Docs, Sheets & Slidesin the visitor's own Google accountOffice files

The Crafting apps (PhotoCraft to SoundCraft) run in the visitor's browser. You choose which apps appear.

1. Set it up in Culacc

Settings → Developers → Edit with Culacc: add your site under Allowed sites (http://localhost works while you build), switch on the apps you want, and choose what happens on save: replace the file, keep the original, or keep every version. Make a key with files:write.

2. Your server starts a session

const { Culacc } = require('@culacc/sdk');
const culacc = new Culacc({ key: process.env.CULACC_KEY });

app.post('/api/culacc-session', requireLogin, async (req, res) => {
  const { editorUrl } = await culacc.edit.createSession({
    origin: 'https://your-site.com',
    fileId: req.body.fileId,            // leave out to let the visitor add a new file
    apps: ['photocraft', 'image-editor'],
    externalRef: String(req.user.id),
  });
  res.json({ editorUrl });              // the page never sees your key
});

3. Your page opens it

<script src="https://culacc.com/api/edit/sdk.js"></script>
<button id="edit">Edit</button>
<script>
  CulaccEditor.attach('#edit', {
    session: () => fetch('/api/culacc-session', {
      method: 'POST', headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ fileId: 4821 }),
    }).then((r) => r.json()),
    onSave: (result) => { preview.src = result.url + '?v=' + result.revision; },
  });
</script>

It opens as a window over the page (full screen on phones), a popup, or a full-page redirect. The result has the file's id, name, size and published address.

4. Your server hears about every save

Subscribe to the file.edited webhook: it arrives even if the visitor closes the tab, with the externalRef you passed.

Costs

You pay for what your visitors use; they pay nothing. Storage at your usual price, traffic 10 GB a month free then €1 per TB, editing time 60 CPU minutes a month free then €0.20 per CPU hour, all under one monthly spending limit you set.

Reference