Last active
February 19, 2021 22:51
-
-
Save forsvunnet/275c0b020e49613004a8688f40047af8 to your computer and use it in GitHub Desktop.
Quill example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var quill = new Quill('#editor-container', { | |
modules: { | |
toolbar: [ | |
[{ header: [1, 2, 3, false] }], | |
[{ 'header': 1 }, { 'header': 2 }, 'bold', 'italic', 'underline'], | |
['image', 'code-block'] | |
], | |
clipboard: { | |
matchVisual: false | |
} | |
}, | |
formats:[ | |
'header','code','bold','italic','underline','image' | |
], | |
placeholder: 'Compose an epic...', | |
theme: 'snow' // or 'bubble' | |
}); | |
var Header = Quill.import('formats/header'); | |
Header.tagName = ["H1", "H2", "H3"]; | |
Quill.register(Header, true); | |
console.log(Quill.imports); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment