Installation
Install the core plus the adapter for your framework.
React
bash
npm install @tlob/babloom-core @tlob/babloom-reactVue 3
bash
npm install @tlob/babloom-core @tlob/babloom-vueSvelte 5
bash
npm install @tlob/babloom-core @tlob/babloom-svelteStyles
Import the base content styles once in your app entry:
ts
import "@tlob/babloom-core/styles.css";Vanilla TypeScript
No framework? Use the core directly.
ts
import { createEditor, StarterKit } from "@tlob/babloom-core";
const editor = createEditor({
element: document.querySelector("#editor")!,
content: "<p>Hello</p>",
extensions: [StarterKit()],
onUpdate: ({ editor }) => console.log(editor.getJSON()),
});