Quill Extension for Divider
npm install quill-dividerbash
yarn add quill-divider
`
$3
`javascript
import Quill from 'quill'
import 'quill/dist/quill.snow.css'
import 'quill-divider'
const toolbarOptions = {
container: [
['bold', 'italic', 'underline', 'strike'],
['divider'],
]
}
const quill = new Quill(editor, {
// ...
modules: {
// ...
toolbar: toolbarOptions,
divider: {
// See optional "config" below
}
}
});
`
$3
For the default experience, pass a true, like so:
`javascript
new Quill(editor, {
// ...
modules: {
// ...
divider: true
}
});
`
#### cssText - Styles of the element
`javascript
new Quill(editor, {
// ...
modules: {
// ...
divider: {
// default
cssText: 'border: none;border-bottom: 1px inset;'
}
}
});
`
#### className - ClassName of the element
`javascript
new Quill(editor, {
// ...
modules: {
// ...
divider: {
// default
className: void 0
}
}
});
`
#### icon - Button icon
`javascript
new Quill(editor, {
// ...
modules: {
// ...
divider: {
// default
icon: ''
}
}
});
`
#### text - When on, insert text in the divider
`javascript
new Quill(editor, {
// ...
modules: {
// ...
divider: {
// default
text: void 0
}
}
});
// Other configurations
new Quill(editor, {
// ...
modules: {
// ...
divider: {
// default
text: {
// Will be replaced by the selected text,default is placeholder
children: 'placeholder',
// Position of text,The optional values are left, center and right
orientation: 'center',
// Styles of the text
childrenStyle: 'padding: 0 24px;'
}
}
}
});
``