4.0.0 • Published 7 months ago

@tadashi/svelte-editor-quill v4.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

svelte-editor-quill

NPM version


Svelte component

Install

Svelte 5

$ npm i @tadashi/svelte-editor-quill@4

Svelte Legacy

$ npm i @tadashi/svelte-editor-quill@3

Usage

Example via StackBlitz.

options

Type: object\ Default: {theme: 'snow'}

See the more options here.

options.plainclipboard

Type: boolean\ Default: false

Accept only paste plain text.

E.g.

<script>
	import { Editor } from '@tadashi/svelte-editor-quill'

	const options = {
		theme: 'snow',
		plainclipboard: true,
	}

	let html = $state('<h1>Go!!</h1><p><strong>Initial</strong> value.</p>')
	let text = $state('')

	const onTextChange = (markup, plaintext) => {
		html = markup
		text = plaintext
	}
</script>

<svelte:head>
	<link
		rel="stylesheet"
		href="https://unpkg.com/quill@2.0.3/dist/quill.snow.css"
		crossorigin
	/>
</svelte:head>

<Editor
	{options}
	{onTextChange}
>{@html $state.snapshot(html)}</Editor>

<div>
	<h3>plaintext</h3>
	<pre>{text}</pre>
</div>

<div>
	<h3>markup</h3>
	<pre>{html}</pre>
</div>

Buy Me a Coffee

BTC: bc1q7famhuj5f25n6qvlm3sssnymk2qpxrfwpyq7g4

License

MIT © Thiago Lagden

3.1.0

7 months ago

4.0.0

7 months ago

3.0.1

1 year ago

3.0.0

1 year ago

2.2.0

2 years ago

2.1.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago