quill-placeholder-module
Quill module for adding placeholders. Demo
Install
npm install --save quill-placeholder-module
Usage
// es5var getPlaceholderModule = default// umdvar getPlaceholderModule = PlaceholderModuledefault Quill var 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):
Foo Required
And include the css from dist/toolbar.css
.
The markup will contain (with default options) <span class="ql-placeholder-content" data-id="placeholder-id" data-label="placeholder-label">...</span>
To transform the output check out https://github.com/jspaine/html-ast-transform