editor

Svelte

Use 82editor as a Svelte component.

npm i @82editor/core @82editor/svelte
<script>
  import { Editor82 } from '@82editor/svelte';
  import '@82editor/core/styles.css';

  let html = $state('');
</script>

<Editor82 bind:value={html} options={{ toolbar: 'board', height: 400 }} />
  • A Svelte 5 component; bind HTML with bind:value.
  • There is also a use:editor82 action.

As an action

<script>
  import { editor82 } from '@82editor/svelte';
</script>

<div use:editor82={{ toolbar: 'basic', onChange: (html) => console.log(html) }}></div>