Skip to content

Commit

Permalink
docs: fix wrong usage
Browse files Browse the repository at this point in the history
  • Loading branch information
zzxming committed Dec 27, 2024
1 parent dd5a0a8 commit 4740c46
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@ npm install quill-header-list
```

```js
import HeaderList from 'quill-header-list';

Quill.register({ 'modules/header-list': HeaderList }, true);
new Quill('#editor', {
theme: 'snow',
modules: {
'toolbar': [[{ header: [null, 1, 2, 3, 4, 5, 6] }, 'header-list'],],
'toolbar': {
container: [[{ header: [null, 1, 2, 3, 4, 5, 6] }, 'header-list']],
handlers: {
'header-list': HeaderList.toolbarHandle
}
},
'header-list': {
container: document.getElementById('directory'), // specify a element to receive the header list
},
Expand Down

0 comments on commit 4740c46

Please sign in to comment.