Skip to content

Instantly share code, notes, and snippets.

@forsvunnet
Last active February 19, 2021 22:51
Show Gist options
  • Save forsvunnet/275c0b020e49613004a8688f40047af8 to your computer and use it in GitHub Desktop.
Save forsvunnet/275c0b020e49613004a8688f40047af8 to your computer and use it in GitHub Desktop.
Quill example
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