A custom build of the Quill Rich Text Editor to support Polymer web components.
- Custom build of Quill that supports editors hosted in Shadow DOM
- Choose from two imports: core or the full Quill library
- Quill stylesheets provided as style modules that can be included in Polymer custom elements
This package (and version) will be updated to remain in sync with the offical Quill project as new releases are available.
$ bower install -S arsnebula/polymer-quillThe default package includes the full library, core styles, and the snow and bubble themes as style modules:
<link rel="import" href="/bower_components/polymer-quill/polymer-quill.html">To only work with the core library and core styles, import the core package:
<link rel="import" href="/bower_components/polymer-quill/polymer-quill-core.html">Include the relevent style modules in your custom element template. You must import the quill-core styles. To include a Quill theme, include the quill-snow and/or the quill-bubble style modules. Add additional styles to customize as necessary.
The following is a demonstration of a basic element with a Quill editor.
<link rel="import" href="/bower_components/polymer-quill/polymer-quill.html">
<dom-module id="my-editor">
<template>
<style include="quill-core quill-snow"></style>
<div id="editor"></div>
</template>
<script>
class MyEditor extends Polymer.Element {
static get is() { return 'my-editor' }
ready() {
super.ready()
this.editor = new Quill(this.$.editor, {
theme: 'snow'
})
}
}
</script>
</dom-module>For more information, see the Quill Documentation.
We welcome and appreciate feedback from the community. Here are a few ways that you can show your appreciation for this package:
-
Give us a Star on GitHub from either webcomponents.org or directly on GitHub.
-
Submit a feature request, or a defect report on the Issues List.
-
Become a Patreon. It takes a lot of time and effort to develop, document, test and support the elements in our Nebula Essentials collection. Your financial contribution will help ensure that our entire collection continues to grow and improve.
If you are a developer, and are interested in making a code contribution, consider opening an issue first to describe the change, and discuss with the core repository maintainers. Once you are ready, prepare a pull request:
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
See CHANGELOG
See LICENSE
