File. Pick the tab of your edition: Editions & Install compares them.
- Free
- Lite
- Full
Free is on public npm, with no key. It has the Adjust tools, and a small “embededitor.com” badge in the corner of the menu.There is no CSS to import.Keep the
1
Install
npm install @embededitor/free
yarn add @embededitor/free
pnpm add @embededitor/free
bun add @embededitor/free
2
Render the Editor
Use the React entry in a React app, or the standalone entry anywhere else.The editor fills the box its parent gives it, so give the parent a height, and at least 320 px of width.
import { EmbedEditor } from '@embededitor/free/react';
const PhotoEditor = ({ src }: { src: string }) => (
<div style={{ height: 600 }}>
<EmbedEditor lang='en-us' src={src} />
</div>
);
export default PhotoEditor;
import { mountEditor } from '@embededitor/free/standalone';
const editor = mountEditor(document.getElementById('editor'), {
lang: 'en-us',
src: '/photos/sunset.jpg'
});
3
Get the File Back
onProcess receives what Save made (dest, a File) and the state it was made with. Without it, Save downloads the file.import { EmbedEditor } from '@embededitor/free/react';
import type { EditState } from '@embededitor/free/react';
const upload = async ({ dest, state }: { dest: File; state: EditState }) => {
const body = new FormData();
body.append('file', dest);
body.append('state', JSON.stringify(state));
await fetch('/api/photos', { body, method: 'POST' });
};
const PhotoEditor = ({ src }: { src: string }) => (
<div style={{ height: 600 }}>
<EmbedEditor lang='en-us' onProcess={upload} src={src} />
</div>
);
export default PhotoEditor;
import { mountEditor } from '@embededitor/free/standalone';
mountEditor(document.getElementById('editor'), {
lang: 'en-us',
onProcess: async ({ dest, state }) => {
const body = new FormData();
body.append('file', dest);
body.append('state', JSON.stringify(state));
await fetch('/api/photos', { body, method: 'POST' });
},
src: '/photos/sunset.jpg'
});
state to reopen the photo with the same edits later.Lite has the Adjust tools, without the badge. It installs from the private registry, with the key of your license.There is no CSS to import.Keep the
1
Get Your Key
Buy a plan on Pricing. The e-mail after the purchase has your license key, and your account at
account.embededitor.com always shows it: sign in with your e-mail (it sends a 6-digit code), and each license has a card with its key, hidden until you tap Show.2
Point Your Project at the Registry
Point the Yarn 2 and newer ignore Set the key where your install runs, your shell or your CI’s secrets, never in git:The key stays out of
@embededitor scope at the registry, and keep the key in an environment variable named EMBED_EDITOR_KEY, out of git.For npm, pnpm, bun and Yarn 1, add this to the .npmrc of your project:.npmrc
@embededitor:registry=https://get.embededitor.com/
//get.embededitor.com/:_authToken=${EMBED_EDITOR_KEY}
.npmrc. Add this to .yarnrc.yml instead:.yarnrc.yml
npmScopes:
embededitor:
npmRegistryServer: "https://get.embededitor.com"
npmAuthToken: "${EMBED_EDITOR_KEY}"
Terminal
export EMBED_EDITOR_KEY=<your-key>
package.json and your lockfile, so npm ci keeps working when you replace it.3
Install
npm install @embededitor/lite
yarn add @embededitor/lite
pnpm add @embededitor/lite
bun add @embededitor/lite
4
Render the Editor
Use the React entry in a React app, or the standalone entry anywhere else.The editor fills the box its parent gives it, so give the parent a height, and at least 320 px of width.
import { EmbedEditor } from '@embededitor/lite/react';
const PhotoEditor = ({ src }: { src: string }) => (
<div style={{ height: 600 }}>
<EmbedEditor lang='en-us' src={src} />
</div>
);
export default PhotoEditor;
import { mountEditor } from '@embededitor/lite/standalone';
const editor = mountEditor(document.getElementById('editor'), {
lang: 'en-us',
src: '/photos/sunset.jpg'
});
5
Get the File Back
onProcess receives what Save made (dest, a File) and the state it was made with. Without it, Save downloads the file.import { EmbedEditor } from '@embededitor/lite/react';
import type { EditState } from '@embededitor/lite/react';
const upload = async ({ dest, state }: { dest: File; state: EditState }) => {
const body = new FormData();
body.append('file', dest);
body.append('state', JSON.stringify(state));
await fetch('/api/photos', { body, method: 'POST' });
};
const PhotoEditor = ({ src }: { src: string }) => (
<div style={{ height: 600 }}>
<EmbedEditor lang='en-us' onProcess={upload} src={src} />
</div>
);
export default PhotoEditor;
import { mountEditor } from '@embededitor/lite/standalone';
mountEditor(document.getElementById('editor'), {
lang: 'en-us',
onProcess: async ({ dest, state }) => {
const body = new FormData();
body.append('file', dest);
body.append('state', JSON.stringify(state));
await fetch('/api/photos', { body, method: 'POST' });
},
src: '/photos/sunset.jpg'
});
state to reopen the photo with the same edits later.Full has every tool, without the badge. It installs from the private registry, with the key of your license.There is no CSS to import.Keep the
1
Get Your Key
Buy a plan on Pricing. The e-mail after the purchase has your license key, and your account at
account.embededitor.com always shows it: sign in with your e-mail (it sends a 6-digit code), and each license has a card with its key, hidden until you tap Show.2
Point Your Project at the Registry
Point the Yarn 2 and newer ignore Set the key where your install runs, your shell or your CI’s secrets, never in git:The key stays out of
@embededitor scope at the registry, and keep the key in an environment variable named EMBED_EDITOR_KEY, out of git.For npm, pnpm, bun and Yarn 1, add this to the .npmrc of your project:.npmrc
@embededitor:registry=https://get.embededitor.com/
//get.embededitor.com/:_authToken=${EMBED_EDITOR_KEY}
.npmrc. Add this to .yarnrc.yml instead:.yarnrc.yml
npmScopes:
embededitor:
npmRegistryServer: "https://get.embededitor.com"
npmAuthToken: "${EMBED_EDITOR_KEY}"
Terminal
export EMBED_EDITOR_KEY=<your-key>
package.json and your lockfile, so npm ci keeps working when you replace it.3
Install
npm install @embededitor/full
yarn add @embededitor/full
pnpm add @embededitor/full
bun add @embededitor/full
4
Render the Editor
Use the React entry in a React app, or the standalone entry anywhere else.The editor fills the box its parent gives it, so give the parent a height, and at least 320 px of width.
import { EmbedEditor } from '@embededitor/full/react';
const PhotoEditor = ({ src }: { src: string }) => (
<div style={{ height: 600 }}>
<EmbedEditor lang='en-us' src={src} />
</div>
);
export default PhotoEditor;
import { mountEditor } from '@embededitor/full/standalone';
const editor = mountEditor(document.getElementById('editor'), {
lang: 'en-us',
src: '/photos/sunset.jpg'
});
5
Get the File Back
onProcess receives what Save made (dest, a File) and the state it was made with. Without it, Save downloads the file.import { EmbedEditor } from '@embededitor/full/react';
import type { EditState } from '@embededitor/full/react';
const upload = async ({ dest, state }: { dest: File; state: EditState }) => {
const body = new FormData();
body.append('file', dest);
body.append('state', JSON.stringify(state));
await fetch('/api/photos', { body, method: 'POST' });
};
const PhotoEditor = ({ src }: { src: string }) => (
<div style={{ height: 600 }}>
<EmbedEditor lang='en-us' onProcess={upload} src={src} />
</div>
);
export default PhotoEditor;
import { mountEditor } from '@embededitor/full/standalone';
mountEditor(document.getElementById('editor'), {
lang: 'en-us',
onProcess: async ({ dest, state }) => {
const body = new FormData();
body.append('file', dest);
body.append('state', JSON.stringify(state));
await fetch('/api/photos', { body, method: 'POST' });
},
src: '/photos/sunset.jpg'
});
state to reopen the photo with the same edits later.Next Steps
Editions & Install
Free, Lite and Full, and the private registry.
Open as a Modal
Open the editor over the page with
openEditor.The Saved State
What
state holds and how to reopen it.Props
Every option the editor takes.