Quill module for inserting placeholders
npm install quill-placeholder-module
npm install --save quill-placeholder-module
`Usage
`js
import getPlaceholderModule from 'quill-placeholder-module'
// es5
var getPlaceholderModule = require('quill-placeholder-module').default
// umd
var getPlaceholderModule = PlaceholderModule.defaultQuill.register('modules/placeholder', getPlaceholderModule(Quill, {
className: 'ql-placeholder-content' // default
})
var quill = new Quill('#editor', {
modules: {
toolbar: {container:
#toolbar},
placeholder: {
delimiters: ['{', '}'], // default
placeholders: [
{id: 'foo', label: 'Foo'},
{id: 'required', label: 'Required', required: true}
]
}
},
placeholder: 'Compose an epic...',
theme: 'snow' // or 'bubble'
});
`
Define the toolbar menu (a more complete example can be found in the demo):
`html
`
And include the css from dist/toolbar.css.The markup will contain (with default options)
...`To transform the output check out https://github.com/jspaine/html-ast-transform