@tadashi/svelte-editor-quill
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

svelte-editor-quill

NPM version Build Status


Svelte component

Install

$ npm i @tadashi/svelte-editor-quill

Usage

See an example here: https://svelte.dev/repl/839ad6a3e1e24b149099c704e18df476?version=3.32.3

options

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

See the options here: https://quilljs.com/docs/configuration/#options

options.plainclipboard

Type: boolean
Default: false

Accept only paste plain text.

Sample

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

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

  function onTextChange(event) {
    console.log(event.detail)
  }
</script>

<svelte:head>
  <link rel="preconnect" href="https://cdn.quilljs.com" crossorigin>
  <link rel="stylesheet" href="https://cdn.quilljs.com/1.3.7/quill.snow.css">
</svelte:head>

<Editor {options} on:text-change={onTextChange} data='Apenas um show' />

License

MIT © Thiago Lagden

Package Sidebar

Install

npm i @tadashi/svelte-editor-quill

Weekly Downloads

343

Version

2.2.0

License

MIT

Unpacked Size

7.16 kB

Total Files

8

Last publish

Collaborators

  • lagden