Skip to content
GitHub

Using Extensions

Extensions allow you to add functionality to Kameo in a modular way, making it easy to build exactly the editing experience you need.

Extensions in Kameo are modular pieces of functionality that you can add to your editor. They can provide:

  • Nodes (form fields, paragraphs, headings, etc.)
  • Marks (bold, italic, underline, etc.)
  • Commands (functions that modify the document)
  • Plugins
  • Custom behaviors and much more

Kameo provides a StarterKit that includes the most common rich text features and a FormKit for form handling.

import { Kameo } from '@kameo/core';
import { StarterKit } from '@kameo/starter-kit';
import { FormKit } from '@kameo/form-kit';

const kameo = new Kameo({
  element: document.querySelector('#kameo'),
  extensions: [
    StarterKit,
    FormKit,
  ],
});