@cairocoder/svelte-typewriter
v1.5.8
Published
A rich text editor for Svelte
Downloads
48
Maintainers
Readme
Svelte Typewriter
A rich text editor for Svelte using Typewriter. WIP.
Installing
npm install --save @cairocoder/svelte-typewriter
import { Editor } from '@cairocoder/svelte-typewriter';
<Editor
toolbar={[
[ 'heading' ],
[ 'bold', 'italic', 'link', 'code' ],
[ 'image' ]
]}
on:text-change={({ detail }) => {
console.log(detail) // change, contents, oldContents, oldSelection, selection, source
}}
on:text-changing={({ detail }) => {
console.log(detail) // change, contents, oldContents, oldSelection, selection, source
}}
on:selection-change={({ detail }) => {
console.log(detail) // selection, oldSelection, source
}}
/>
Upcoming
- Custom Toolbar Button API
- Tests