Get started
Quickstart
The full editor on a page in your app, running on your machine with a test key. About five minutes. When it works, strict mode takes the key out of your pages before you go live.
1. Create an application and a test key#
- Sign in to the dashboard and create your organization. You can try everything with test keys before choosing a plan.
- Open Applications, choose New application, and name it after your product.
- In the application, choose New key:
- Kind: Publishable key, for your pages.
- Environment: Test.
- Domains: the address your app runs on locally, for example
http://localhost:3000. That's the scheme, host and port, with no path.
- Copy the key (
dvn_pk_test_…). It's shown once. If you lose it, replace it.
If you have a developer seat, Your setup in the dashboard gives you a personal test key for your own machine instead. It works the same way.
2. Install#
Pick your framework:
npm install @dorvyn/elements # plain HTML, Vue, Svelte, or any other framework
npm install @dorvyn/react # React
npm install @dorvyn/next # Next.js (App Router)
npm install @dorvyn/angular # AngularEach depends on @dorvyn/core, the editor without an interface. You never install it yourself.
3. Put the editor on a page#
The editor fills the element you give it, so give it a height.
HTML:
<script type="module">
import "@dorvyn/elements/define";
</script>
<dorvyn-editor license="dvn_pk_test_…" autosave-key="my-doc" style="display: block; height: 100vh"></dorvyn-editor>React:
import { DorvynEditor } from "@dorvyn/react";
export function App() {
return <DorvynEditor license="dvn_pk_test_…" autosaveKey="my-doc" style={{ height: "100vh" }} />;
}Next.js (in a Server Component page, as it is):
import { DorvynEditor } from "@dorvyn/next";
export default function Page() {
return <DorvynEditor license={process.env.NEXT_PUBLIC_DORVYN_KEY!} autosaveKey="my-doc" style={{ height: "100vh" }} />;
}Angular:
import { CUSTOM_ELEMENTS_SCHEMA, Component } from "@angular/core";
import { DORVYN_DIRECTIVES } from "@dorvyn/angular";
@Component({
selector: "app-editor",
imports: [...DORVYN_DIRECTIVES],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
template: `<dorvyn-editor [dorvynLicense]="key" dorvynAutosaveKey="my-doc" style="display: block; height: 100vh"></dorvyn-editor>`,
})
export class EditorComponent {
key = "dvn_pk_test_…";
}4. Open the page#
Start your app and open it at the address you listed. The editor loads, gets a license, and becomes editable within a second or two. Type something, reload, and your draft is still there (that's autosave-key). File → Save a Copy downloads a .docx.
Files saved with a test key carry a short note that they were made with a test key. Live keys don't add it.
If it stays read-only, or shows a message, see Troubleshooting. The usual cause is an address that doesn't exactly match the domain on the key: http://localhost:3000 and http://127.0.0.1:3000 are different addresses.
Next#
- Strict mode: keep the key out of your pages. Recommended for every live site, and required on the Organization plan.
- The full editor and layouts: use only some of our pieces, or lay them out your own way.
- Opening and saving documents: keep documents in your own storage.
- Theming and branding: your colours, font and logo.