├── .gitignore ├── quilljs-source-code ├── docs │ ├── CNAME │ ├── robots.txt │ ├── assets │ │ └── images │ │ │ ├── footer.png │ │ │ ├── favicon.ico │ │ │ ├── blog │ │ │ ├── bubble.png │ │ │ ├── color.png │ │ │ ├── syntax.png │ │ │ ├── formula.png │ │ │ ├── theme-1.png │ │ │ └── theme-2.png │ │ │ ├── brand-asset.png │ │ │ └── users │ │ │ ├── asana.png │ │ │ ├── front.png │ │ │ ├── lever.png │ │ │ ├── buffer.png │ │ │ ├── gannett.png │ │ │ ├── hubspot.png │ │ │ ├── intuit.png │ │ │ ├── linkedin.png │ │ │ ├── reedsy.png │ │ │ ├── usatoday.png │ │ │ ├── voxmedia.png │ │ │ └── salesforce.png │ ├── 0.20 │ │ └── assets │ │ │ ├── images │ │ │ ├── icon.png │ │ │ ├── pen.png │ │ │ ├── cloud.png │ │ │ ├── tubes.png │ │ │ ├── browsers.png │ │ │ ├── favicon.png │ │ │ ├── cloud-large.png │ │ │ ├── quill-photo.jpg │ │ │ ├── users │ │ │ │ ├── asana.png │ │ │ │ ├── front.png │ │ │ │ ├── lever.png │ │ │ │ ├── intuit.png │ │ │ │ ├── reedsy.png │ │ │ │ ├── relateiq.png │ │ │ │ ├── voxmedia.png │ │ │ │ ├── writer.png │ │ │ │ ├── respondly.png │ │ │ │ ├── salesforce.png │ │ │ │ ├── themexpert.png │ │ │ │ └── merchantcircle.png │ │ │ └── blog │ │ │ │ ├── theme-1.png │ │ │ │ └── theme-2.png │ │ │ └── js │ │ │ └── index.js │ ├── _includes │ │ ├── basic-editor.html │ │ ├── github.html │ │ ├── open-source.html │ │ ├── sidebar.html │ │ ├── footer.html │ │ ├── svg │ │ │ ├── octocat.svg │ │ │ └── logo.svg │ │ ├── full-editor.html │ │ ├── standalone │ │ │ ├── bubble.html │ │ │ ├── snow.html │ │ │ └── full.html │ │ ├── lotr.html │ │ ├── analytics.html │ │ ├── full-toolbar.html │ │ ├── meta.html │ │ └── header.html │ ├── docs │ │ ├── standalone │ │ │ ├── full.md │ │ │ ├── snow.md │ │ │ ├── bubble.md │ │ │ └── basic.md │ │ ├── modules │ │ │ ├── formula.md │ │ │ ├── syntax.md │ │ │ ├── history.md │ │ │ └── clipboard.md │ │ ├── api.md │ │ ├── quickstart.md │ │ ├── formats.md │ │ ├── download.md │ │ ├── api │ │ │ ├── editor.md │ │ │ ├── selection.md │ │ │ └── model.md │ │ ├── modules.md │ │ └── themes.md │ ├── _layouts │ │ ├── blog.html │ │ ├── post.html │ │ ├── standalone.html │ │ ├── default.html │ │ └── v0.20.html │ ├── _posts │ │ ├── 2014-08-12-an-official-cdn-for-quill.md │ │ ├── 2016-05-03-quill-1-0-beta-release.md │ │ ├── 2016-03-14-are-we-there-yet-to-1-0.md │ │ └── 2014-11-06-quill-v0-19-no-more-iframes.md │ ├── _data │ │ ├── guides.yaml │ │ ├── api.yaml │ │ └── docs.yaml │ ├── _config.yml │ ├── blog.html │ ├── playground.html │ └── guides │ │ └── adding-quill-to-your-build-pipeline.md ├── _develop │ ├── jekyll.yml │ ├── procfile │ ├── scripts │ │ ├── webdriver.sh │ │ └── release.sh │ ├── sauce.js │ ├── wdio.config.js │ ├── proxy.js │ ├── karma.config.js │ └── browsers.js ├── assets │ ├── favicon.png │ ├── icons │ │ ├── dropdown.svg │ │ ├── mention.svg │ │ ├── comment.svg │ │ ├── undo.svg │ │ ├── redo.svg │ │ ├── attachment.svg │ │ ├── table-merge-cells.svg │ │ ├── underline.svg │ │ ├── italic.svg │ │ ├── align-center.svg │ │ ├── align-left.svg │ │ ├── align-right.svg │ │ ├── align-justify.svg │ │ ├── code.svg │ │ ├── float-full.svg │ │ ├── image.svg │ │ ├── float-center.svg │ │ ├── table-border-all.svg │ │ ├── color.svg │ │ ├── emoji.svg │ │ ├── bold.svg │ │ ├── outdent.svg │ │ ├── indent.svg │ │ ├── size-decrease.svg │ │ ├── speech.svg │ │ ├── hashtag.svg │ │ ├── blockquote.svg │ │ ├── authorship.svg │ │ ├── header-2.svg │ │ ├── clean.svg │ │ ├── direction-ltr.svg │ │ ├── direction-rtl.svg │ │ ├── size-increase.svg │ │ ├── float-left.svg │ │ ├── table-unmerge-cells.svg │ │ ├── link.svg │ │ ├── list-bullet.svg │ │ ├── float-right.svg │ │ ├── list-check.svg │ │ ├── table-insert-columns.svg │ │ ├── audio.svg │ │ ├── size.svg │ │ ├── header.svg │ │ ├── spacing.svg │ │ ├── table.svg │ │ ├── table-insert-rows.svg │ │ ├── table-delete-columns.svg │ │ ├── table-delete-rows.svg │ │ ├── strike.svg │ │ ├── superscript.svg │ │ ├── subscript.svg │ │ ├── map.svg │ │ ├── font.svg │ │ ├── list-ordered.svg │ │ ├── table-insert-cells.svg │ │ ├── table-delete-cells.svg │ │ ├── video.svg │ │ ├── formula.svg │ │ ├── table-border-none.svg │ │ ├── table-border-right.svg │ │ ├── table-border-bottom.svg │ │ ├── table-border-outside.svg │ │ ├── table-border-left.svg │ │ ├── table-border-top.svg │ │ └── background.svg │ ├── bubble │ │ ├── toolbar.styl │ │ └── tooltip.styl │ ├── snow.styl │ ├── snow │ │ ├── toolbar.styl │ │ └── tooltip.styl │ └── bubble.styl ├── blots │ ├── embed.js │ ├── text.js │ ├── container.js │ ├── break.js │ ├── table.js │ ├── table_row.js │ ├── inline.js │ ├── contain.js │ └── table_cell.js ├── formats │ ├── italic.js │ ├── strike.js │ ├── underline.js │ ├── blockquote.js │ ├── header.js │ ├── background.js │ ├── size.js │ ├── align.js │ ├── bold.js │ ├── direction.js │ ├── font.js │ ├── script.js │ ├── color.js │ ├── indent.js │ ├── link.js │ ├── video.js │ └── image.js ├── core │ ├── module.js │ ├── logger.js │ ├── theme.js │ ├── emitter.js │ └── polyfill.js ├── test │ ├── unit │ │ ├── formats │ │ │ ├── bold.js │ │ │ ├── indent.js │ │ │ ├── script.js │ │ │ ├── header.js │ │ │ ├── align.js │ │ │ ├── color.js │ │ │ └── link.js │ │ ├── blots │ │ │ ├── inline.js │ │ │ ├── block.js │ │ │ └── scroll.js │ │ └── ui │ │ │ └── picker.js │ └── unit.js ├── ui │ ├── icon-picker.js │ ├── color-picker.js │ ├── tooltip.js │ └── icons.js ├── modules │ ├── formula.js │ ├── syntax.js │ └── toolbar_extended.js ├── core.js ├── LICENSE └── package.json ├── quilljs-table └── .gitignore └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store -------------------------------------------------------------------------------- /quilljs-source-code/docs/CNAME: -------------------------------------------------------------------------------- 1 | quilljs.com -------------------------------------------------------------------------------- /quilljs-table/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store -------------------------------------------------------------------------------- /quilljs-source-code/docs/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Allow: / 3 | -------------------------------------------------------------------------------- /quilljs-source-code/_develop/jekyll.yml: -------------------------------------------------------------------------------- 1 | cdn: / 2 | quill: quill.js 3 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/assets/favicon.png -------------------------------------------------------------------------------- /quilljs-source-code/blots/embed.js: -------------------------------------------------------------------------------- 1 | import Parchment from 'parchment'; 2 | 3 | class Embed extends Parchment.Embed { } 4 | 5 | export default Embed; 6 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/footer.png -------------------------------------------------------------------------------- /quilljs-source-code/blots/text.js: -------------------------------------------------------------------------------- 1 | import Parchment from 'parchment'; 2 | 3 | class TextBlot extends Parchment.Text { } 4 | 5 | export default TextBlot; 6 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/icon.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/pen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/pen.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/_includes/basic-editor.html: -------------------------------------------------------------------------------- 1 | var basicEditor = new Quill('#basic-editor', { 2 | modules: { 'toolbar': '#basic-toolbar' } 3 | }); 4 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/favicon.ico -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/cloud.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/tubes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/tubes.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/blog/bubble.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/blog/bubble.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/blog/color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/blog/color.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/blog/syntax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/blog/syntax.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/brand-asset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/brand-asset.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/users/asana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/users/asana.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/users/front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/users/front.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/users/lever.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/users/lever.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/browsers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/browsers.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/favicon.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/blog/formula.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/blog/formula.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/blog/theme-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/blog/theme-1.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/blog/theme-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/blog/theme-2.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/users/buffer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/users/buffer.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/users/gannett.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/users/gannett.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/users/hubspot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/users/hubspot.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/users/intuit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/users/intuit.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/users/linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/users/linkedin.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/users/reedsy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/users/reedsy.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/users/usatoday.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/users/usatoday.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/users/voxmedia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/users/voxmedia.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/cloud-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/cloud-large.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/quill-photo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/quill-photo.jpg -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/users/asana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/users/asana.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/users/front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/users/front.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/users/lever.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/users/lever.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/assets/images/users/salesforce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/assets/images/users/salesforce.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/blog/theme-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/blog/theme-1.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/blog/theme-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/blog/theme-2.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/users/intuit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/users/intuit.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/users/reedsy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/users/reedsy.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/users/relateiq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/users/relateiq.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/users/voxmedia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/users/voxmedia.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/users/writer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/users/writer.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/users/respondly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/users/respondly.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/users/salesforce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/users/salesforce.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/users/themexpert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/users/themexpert.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/docs/standalone/full.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: standalone 3 | title: Full Editor 4 | permalink: /standalone/full/ 5 | --- 6 | 7 | {% include standalone/full.html %} 8 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/docs/standalone/snow.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: standalone 3 | title: Snow Theme 4 | permalink: /standalone/snow/ 5 | --- 6 | 7 | {% include standalone/snow.html %} 8 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/0.20/assets/images/users/merchantcircle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dost/quilljs-table/HEAD/quilljs-source-code/docs/0.20/assets/images/users/merchantcircle.png -------------------------------------------------------------------------------- /quilljs-source-code/docs/docs/standalone/bubble.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: standalone 3 | title: Bubble Theme 4 | permalink: /standalone/bubble/ 5 | --- 6 | 7 | {% include standalone/bubble.html %} 8 | -------------------------------------------------------------------------------- /quilljs-source-code/formats/italic.js: -------------------------------------------------------------------------------- 1 | import Bold from './bold'; 2 | 3 | class Italic extends Bold { } 4 | Italic.blotName = 'italic'; 5 | Italic.tagName = ['EM', 'I']; 6 | 7 | export default Italic; 8 | -------------------------------------------------------------------------------- /quilljs-source-code/formats/strike.js: -------------------------------------------------------------------------------- 1 | import Inline from '../blots/inline'; 2 | 3 | class Strike extends Inline { } 4 | Strike.blotName = 'strike'; 5 | Strike.tagName = 'S'; 6 | 7 | export default Strike; 8 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/dropdown.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/mention.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/formats/underline.js: -------------------------------------------------------------------------------- 1 | import Inline from '../blots/inline'; 2 | 3 | class Underline extends Inline { } 4 | Underline.blotName = 'underline'; 5 | Underline.tagName = 'U'; 6 | 7 | export default Underline; 8 | -------------------------------------------------------------------------------- /quilljs-source-code/core/module.js: -------------------------------------------------------------------------------- 1 | class Module { 2 | constructor(quill, options = {}) { 3 | this.quill = quill; 4 | this.options = options; 5 | } 6 | } 7 | Module.DEFAULTS = {}; 8 | 9 | 10 | export default Module; 11 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/comment.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/undo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/redo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/attachment.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/formats/blockquote.js: -------------------------------------------------------------------------------- 1 | import Block from '../blots/block'; 2 | 3 | 4 | class Blockquote extends Block {} 5 | Blockquote.blotName = 'blockquote'; 6 | Blockquote.tagName = 'blockquote'; 7 | 8 | 9 | export default Blockquote; 10 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/table-merge-cells.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/underline.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/italic.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/align-center.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/align-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/align-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/align-justify.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/code.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/blots/container.js: -------------------------------------------------------------------------------- 1 | import Parchment from 'parchment'; 2 | import Block, { BlockEmbed } from './block'; 3 | 4 | 5 | class Container extends Parchment.Container { } 6 | Container.allowedChildren = [Block, BlockEmbed, Container]; 7 | 8 | 9 | export default Container; 10 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/float-full.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/image.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/float-center.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/table-border-all.svg: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/color.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/emoji.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/_layouts/blog.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | 6 | 7 | 8 |
abc
'); 7 | let bold = document.createElement('b'); 8 | bold.appendChild(scroll.domNode.firstChild.childNodes[1]); 9 | scroll.domNode.firstChild.insertBefore(bold, scroll.domNode.firstChild.lastChild); 10 | scroll.update(); 11 | expect(scroll.domNode).toEqualHTML('abc
'); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/superscript.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/_develop/sauce.js: -------------------------------------------------------------------------------- 1 | var _ = require('lodash'); 2 | var os = require('os'); 3 | 4 | var options = { 5 | username: process.env.SAUCE_USER || 'quill', 6 | accessKey: process.env.SAUCE_KEY || 'adc0c0cf-221b-46f1-81b9-a4429b722c2e' 7 | }; 8 | 9 | if (process.env.TRAVIS) { 10 | module.exports = { 11 | build: process.env.TRAVIS_BUILD_ID, 12 | tunnel: process.env.TRAVIS_JOB_NUMBER 13 | }; 14 | } else { 15 | var id = _.random(16*16*16*16).toString(16); 16 | module.exports = { 17 | build: os.hostname() + '-' + id, 18 | tunnel: os.hostname() + '-tunnel-' + id 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/_includes/svg/octocat.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/core/logger.js: -------------------------------------------------------------------------------- 1 | let levels = ['error', 'warn', 'log', 'info']; 2 | let level = 'warn'; 3 | 4 | function debug(method, ...args) { 5 | if (levels.indexOf(method) <= levels.indexOf(level)) { 6 | console[method].apply(console, args); // eslint-disable-line no-console 7 | } 8 | } 9 | 10 | function namespace(ns) { 11 | return levels.reduce(function(logger, method) { 12 | logger[method] = debug.bind(console, method, ns); 13 | return logger; 14 | }, {}); 15 | } 16 | 17 | debug.level = namespace.level = function(newLevel) { 18 | level = newLevel; 19 | }; 20 | 21 | 22 | export default namespace; 23 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/_posts/2014-08-12-an-official-cdn-for-quill.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | permalink: /blog/an-official-cdn-for-quill/ 4 | title: An Offical CDN for Quill 5 | --- 6 | 7 | Quill now has an offical Content Distribution Network so you can have access to a reliable, high-speed host for the library. To include a file: 8 | 9 | ```html 10 | 11 | ``` 12 | ```html 13 | 14 | ``` 15 | 16 | You can also use "latest" as the version: 17 | 18 | ```html 19 | 20 | ``` 21 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/_includes/full-editor.html: -------------------------------------------------------------------------------- 1 | // Initialize editor with custom theme and modules 2 | var fullEditor = new Quill('#full-editor', { 3 | modules: { 4 | 'toolbar': { container: '#full-toolbar' }, 5 | }, 6 | theme: 'snow' 7 | }); 8 | 9 | // Update basic editor's content with ours 10 | fullEditor.on('text-change', function(delta, oldDelta, source) { 11 | if (source === 'user') { 12 | basicEditor.updateContents(delta); 13 | } 14 | }); 15 | 16 | // Update our content with basic editor's 17 | basicEditor.on('text-change', function(delta, oldDelta, source) { 18 | if (source === 'user') { 19 | fullEditor.updateContents(delta); 20 | } 21 | }); -------------------------------------------------------------------------------- /quilljs-source-code/formats/script.js: -------------------------------------------------------------------------------- 1 | import Inline from '../blots/inline'; 2 | 3 | class Script extends Inline { 4 | static create(value) { 5 | if (value === 'super') { 6 | return document.createElement('sup'); 7 | } else if (value === 'sub') { 8 | return document.createElement('sub'); 9 | } else { 10 | return super.create(value); 11 | } 12 | } 13 | 14 | static formats(domNode) { 15 | if (domNode.tagName === 'SUB') return 'sub'; 16 | if (domNode.tagName === 'SUP') return 'super'; 17 | return undefined; 18 | } 19 | } 20 | Script.blotName = 'script'; 21 | Script.tagName = ['SUB', 'SUP']; 22 | 23 | export default Script; 24 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/_data/guides.yaml: -------------------------------------------------------------------------------- 1 | - title: Why Quill 2 | url: /guides/why-quill/ 3 | - title: How to Customize Quill 4 | url: /guides/how-to-customize-quill/ 5 | - title: Adding Quill to Your Build Pipeline 6 | url: /guides/adding-quill-to-your-build-pipeline/ 7 | - title: Building a Custom Module 8 | url: /guides/building-a-custom-module/ 9 | - title: Cloning Medium with Parchment 10 | url: /guides/cloning-medium-with-parchment/ 11 | - title: Designing the Delta Format 12 | url: /guides/designing-the-delta-format/ 13 | - title: Comparison with Other Rich Text Editors 14 | url: /guides/comparison-with-other-rich-text-editors/ 15 | - title: Upgrading to 1.0 16 | url: /guides/upgrading-to-1-0/ 17 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/subscript.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/_includes/standalone/bubble.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 |http://en.wikipedia.org/wiki/One_Ring
3 |Three Rings for the Elven-kings under the sky,
5 |Seven for the Dwarf-lords in halls of stone,
6 |Nine for Mortal Men, doomed to die,
7 |One for the Dark Lord on his dark throne.
8 |In the Land of Mordor where the Shadows lie.
10 |One Ring to rule them all, One Ring to find them,
11 |One Ring to bring them all and in the darkness bind them.
12 |In the Land of Mordor where the Shadows lie.
-------------------------------------------------------------------------------- /quilljs-source-code/ui/icon-picker.js: -------------------------------------------------------------------------------- 1 | import Picker from './picker'; 2 | 3 | 4 | class IconPicker extends Picker { 5 | constructor(select, icons) { 6 | super(select); 7 | this.container.classList.add('ql-icon-picker'); 8 | [].forEach.call(this.container.querySelectorAll('.ql-picker-item'), (item) => { 9 | item.innerHTML = icons[item.getAttribute('data-value') || '']; 10 | }); 11 | this.defaultItem = this.container.querySelector('.ql-selected'); 12 | this.selectItem(this.defaultItem); 13 | } 14 | 15 | selectItem(item, trigger) { 16 | super.selectItem(item, trigger); 17 | item = item || this.defaultItem; 18 | this.label.innerHTML = item.innerHTML; 19 | } 20 | } 21 | 22 | 23 | export default IconPicker; 24 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/font.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/core/theme.js: -------------------------------------------------------------------------------- 1 | class Theme { 2 | constructor(quill, options) { 3 | this.quill = quill; 4 | this.options = options; 5 | this.modules = {}; 6 | } 7 | 8 | init() { 9 | Object.keys(this.options.modules).forEach((name) => { 10 | if (this.modules[name] == null) { 11 | this.addModule(name); 12 | } 13 | }); 14 | } 15 | 16 | addModule(name) { 17 | let moduleClass = this.quill.constructor.import(`modules/${name}`); 18 | this.modules[name] = new moduleClass(this.quill, this.options.modules[name] || {}); 19 | return this.modules[name]; 20 | } 21 | } 22 | Theme.DEFAULTS = { 23 | modules: {} 24 | }; 25 | Theme.themes = { 26 | 'default': Theme 27 | }; 28 | 29 | 30 | export default Theme; 31 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/docs/modules/formula.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: docs 3 | title: Formula Module 4 | permalink: /docs/modules/formula/ 5 | --- 6 | 7 | The Formula Module adds beautifully rendered formulas into Quill documents, powered by [KaTeX](https://khan.github.io/KaTeX/). 8 | 9 | 10 | ### Example 11 | 12 | ```html 13 | 14 | 15 | 16 | 17 | 18 | 19 | 28 | ``` 29 | -------------------------------------------------------------------------------- /quilljs-source-code/formats/color.js: -------------------------------------------------------------------------------- 1 | import Parchment from 'parchment'; 2 | 3 | class ColorAttributor extends Parchment.Attributor.Style { 4 | value(domNode) { 5 | let value = super.value(domNode); 6 | if (!value.startsWith('rgb(')) return value; 7 | value = value.replace(/^[^\d]+/, '').replace(/[^\d]+$/, ''); 8 | return '#' + value.split(',').map(function(component) { 9 | return ('00' + parseInt(component).toString(16)).slice(-2); 10 | }).join(''); 11 | } 12 | } 13 | 14 | let ColorClass = new Parchment.Attributor.Class('color', 'ql-color', { 15 | scope: Parchment.Scope.INLINE 16 | }); 17 | let ColorStyle = new ColorAttributor('color', 'color', { 18 | scope: Parchment.Scope.INLINE 19 | }); 20 | 21 | export { ColorAttributor, ColorClass, ColorStyle }; 22 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/snow/toolbar.styl: -------------------------------------------------------------------------------- 1 | .ql-toolbar.ql-snow 2 | border: 1px solid borderColor 3 | box-sizing: border-box 4 | font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif 5 | padding: 8px 6 | 7 | .ql-formats 8 | margin-right: 15px 9 | 10 | .ql-picker-label 11 | border: 1px solid transparent 12 | .ql-picker-options 13 | border: 1px solid transparent 14 | box-shadow: rgba(0,0,0,0.2) 0 2px 8px 15 | .ql-picker.ql-expanded 16 | .ql-picker-label 17 | border-color: borderColor 18 | .ql-picker-options 19 | border-color: borderColor 20 | 21 | .ql-color-picker 22 | .ql-picker-item.ql-selected, .ql-picker-item:hover 23 | border-color: #000 24 | 25 | .ql-toolbar.ql-snow + .ql-container.ql-snow 26 | border-top: 0px; 27 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/list-ordered.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/_develop/wdio.config.js: -------------------------------------------------------------------------------- 1 | exports.config = { 2 | specs: [ 3 | './test/functional/epic.js' 4 | ], 5 | exclude: [], 6 | 7 | reporters: ['spec'], 8 | 9 | maxInstances: 10, 10 | capabilities: [{ 11 | browserName: 'chrome' 12 | }], 13 | 14 | sync: true, 15 | logLevel: 'error', 16 | coloredLogs: true, 17 | 18 | baseUrl: 'http://localhost:' + process.env.npm_package_config_ports_proxy, 19 | 20 | waitforTimeout: 10000, 21 | connectionRetryTimeout: 90000, 22 | connectionRetryCount: 3, 23 | 24 | framework: 'jasmine', 25 | jasmineNodeOpts: { 26 | defaultTimeoutInterval: 10000, 27 | expectationResultHandler: function(passed, assertion) { 28 | if (passed) return; 29 | this.saveScreenshot('./wd-' + this.desiredCapabilities.browserName + '-error.png'); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/table-insert-cells.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/table-delete-cells.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/core/emitter.js: -------------------------------------------------------------------------------- 1 | import EventEmitter from 'eventemitter3'; 2 | import logger from './logger'; 3 | 4 | let debug = logger('quill:events'); 5 | 6 | 7 | class Emitter extends EventEmitter { 8 | constructor() { 9 | super(); 10 | this.on('error', debug.error); 11 | } 12 | 13 | emit() { 14 | debug.log.apply(debug, arguments); 15 | super.emit.apply(this, arguments); 16 | } 17 | } 18 | 19 | Emitter.events = { 20 | EDITOR_CHANGE : 'editor-change', 21 | SCROLL_BEFORE_UPDATE : 'scroll-before-update', 22 | SCROLL_OPTIMIZE : 'scroll-optimize', 23 | SCROLL_UPDATE : 'scroll-update', 24 | SELECTION_CHANGE : 'selection-change', 25 | TEXT_CHANGE : 'text-change' 26 | }; 27 | Emitter.sources = { 28 | API : 'api', 29 | SILENT : 'silent', 30 | USER : 'user' 31 | }; 32 | 33 | 34 | export default Emitter; 35 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/blog.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: blog 3 | title: Blog 4 | permalink: /blog/ 5 | --- 6 | 7 | {% for post in site.posts %} 8 | {% unless post.draft %} 9 |a2 + b2 = c2
'); 7 | editor.formatText(6, 1, { script: 'super' }); 8 | expect(editor.scroll.domNode).toEqualHTML('a2 + b2 = c2
'); 9 | }); 10 | 11 | it('remove', function() { 12 | let editor = this.initialize(Editor, 'a2 + b2
'); 13 | editor.formatText(1, 1, { script: false }); 14 | expect(editor.scroll.domNode).toEqualHTML('a2 + b2
'); 15 | }); 16 | 17 | it('replace', function() { 18 | let editor = this.initialize(Editor, 'a2 + b2
'); 19 | editor.formatText(1, 1, { script: 'sub' }); 20 | expect(editor.scroll.domNode).toEqualHTML('a2 + b2
'); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/_includes/svg/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/blots/table.js: -------------------------------------------------------------------------------- 1 | import Parchment from 'parchment'; 2 | import Container from './container'; 3 | import TableRow from './table_row'; 4 | 5 | 6 | class Table extends Container { 7 | 8 | static create(value) { 9 | let tagName = 'table'; 10 | let node = super.create(tagName); 11 | node.setAttribute('table_id', value); 12 | return node; 13 | } 14 | 15 | optimize() { 16 | super.optimize(); 17 | let next = this.next; 18 | if (next != null && next.prev === this && 19 | next.statics.blotName === this.statics.blotName && 20 | next.domNode.tagName === this.domNode.tagName && 21 | next.domNode.getAttribute('table_id') === this.domNode.getAttribute('table_id')) { 22 | next.moveChildren(this); 23 | next.remove(); 24 | } 25 | } 26 | 27 | } 28 | 29 | Table.blotName = 'table'; 30 | Table.tagName = 'table'; 31 | Table.scope = Parchment.Scope.BLOCK_BLOT; 32 | Table.defaultChild = 'tr'; 33 | Table.allowedChildren = [TableRow]; 34 | 35 | 36 | export default Table; 37 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/_includes/standalone/snow.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 14 | 15 |Hello World!
'); 7 | scroll.formatAt(0, 1, 'bold', true); 8 | scroll.formatAt(0, 1, 'italic', true); 9 | scroll.formatAt(2, 1, 'italic', true); 10 | scroll.formatAt(2, 1, 'bold', true); 11 | expect(scroll.domNode).toEqualHTML( 12 | 'Hello World!
' 13 | ); 14 | }); 15 | 16 | it('reorder', function() { 17 | let scroll = this.initialize(Scroll, '0123
'); 18 | let p = scroll.domNode.firstChild; 19 | let em = document.createElement('em'); 20 | [].slice.call(p.childNodes).forEach(function(node) { 21 | em.appendChild(node); 22 | }); 23 | p.appendChild(em); 24 | expect(scroll.domNode).toEqualHTML('0123
'); 25 | scroll.update(); 26 | expect(scroll.domNode).toEqualHTML( 27 | '0123
' 28 | ); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/bubble.styl: -------------------------------------------------------------------------------- 1 | themeName = 'bubble' 2 | activeColor = #fff 3 | borderColor = #777 4 | backgroundColor = #444 5 | inactiveColor = #ccc 6 | shadowColor = #ddd 7 | textColor = #fff 8 | 9 | @import './core' 10 | @import './base' 11 | @import './bubble/*' 12 | 13 | .ql-container.ql-bubble:not(.ql-disabled) 14 | a 15 | position: relative 16 | white-space: nowrap 17 | a::before 18 | background-color: #444 19 | border-radius: 15px 20 | top: -5px 21 | font-size: 12px 22 | color: #fff 23 | content: attr(href) 24 | font-weight: normal 25 | overflow: hidden 26 | padding: 5px 15px 27 | text-decoration: none 28 | z-index: 1 29 | a::after 30 | border-top: 6px solid #444 31 | border-left: 6px solid transparent 32 | border-right: 6px solid transparent 33 | top: 0 34 | content: " " 35 | height: 0 36 | width: 0 37 | a::before, a::after 38 | left: 0 39 | margin-left: 50% 40 | position: absolute 41 | transform: translate(-50%, -100%) 42 | transition: visibility 0s ease 200ms 43 | visibility: hidden 44 | a:hover::before, a:hover::after 45 | visibility: visible 46 | -------------------------------------------------------------------------------- /quilljs-source-code/formats/link.js: -------------------------------------------------------------------------------- 1 | import Inline from '../blots/inline'; 2 | 3 | 4 | class Link extends Inline { 5 | static create(value) { 6 | let node = super.create(value); 7 | value = this.sanitize(value); 8 | node.setAttribute('href', value); 9 | node.setAttribute('target', '_blank'); 10 | return node; 11 | } 12 | 13 | static formats(domNode) { 14 | return domNode.getAttribute('href'); 15 | } 16 | 17 | static sanitize(url) { 18 | return sanitize(url, ['http', 'https', 'mailto']) ? url : this.SANITIZED_URL; 19 | } 20 | 21 | format(name, value) { 22 | if (name !== this.statics.blotName || !value) return super.format(name, value); 23 | value = this.constructor.sanitize(value); 24 | this.domNode.setAttribute('href', value); 25 | } 26 | } 27 | Link.blotName = 'link'; 28 | Link.tagName = 'A'; 29 | Link.SANITIZED_URL = 'about:blank'; 30 | 31 | 32 | function sanitize(url, protocols) { 33 | let anchor = document.createElement('a'); 34 | anchor.href = url; 35 | let protocol = anchor.href.slice(0, anchor.href.indexOf(':')); 36 | return protocols.indexOf(protocol) > -1; 37 | } 38 | 39 | 40 | export { Link as default, sanitize }; 41 | -------------------------------------------------------------------------------- /quilljs-source-code/core.js: -------------------------------------------------------------------------------- 1 | import Parchment from 'parchment'; 2 | import Quill from './core/quill'; 3 | 4 | import Block, { BlockEmbed } from './blots/block'; 5 | import Break from './blots/break'; 6 | import Container from './blots/container'; 7 | import Cursor from './blots/cursor'; 8 | import Embed from './blots/embed'; 9 | import Inline from './blots/inline'; 10 | import Scroll from './blots/scroll'; 11 | import TextBlot from './blots/text'; 12 | 13 | import Clipboard from './modules/clipboard'; 14 | import History from './modules/history'; 15 | import Keyboard from './modules/keyboard'; 16 | 17 | 18 | Quill.register({ 19 | 'blots/block' : Block, 20 | 'blots/block/embed' : BlockEmbed, 21 | 'blots/break' : Break, 22 | 'blots/container' : Container, 23 | 'blots/cursor' : Cursor, 24 | 'blots/embed' : Embed, 25 | 'blots/inline' : Inline, 26 | 'blots/scroll' : Scroll, 27 | 'blots/text' : TextBlot, 28 | 29 | 'modules/clipboard' : Clipboard, 30 | 'modules/history' : History, 31 | 'modules/keyboard' : Keyboard, 32 | }); 33 | 34 | Parchment.register(Block, Break, Cursor, Inline, Scroll, TextBlot); 35 | 36 | 37 | module.exports = Quill; 38 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/_includes/analytics.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/_data/docs.yaml: -------------------------------------------------------------------------------- 1 | - title: Quickstart 2 | url: /docs/quickstart/ 3 | - title: Download 4 | url: /docs/download/ 5 | - title: Configuration 6 | url: /docs/configuration/ 7 | - title: Formats 8 | url: /docs/formats/ 9 | - title: API 10 | url: /docs/api/ 11 | children: 12 | - title: Content 13 | url: /docs/api/#content 14 | - title: Formatting 15 | url: /docs/api/#formatting 16 | - title: Selection 17 | url: /docs/api/#selection 18 | - title: Editor 19 | url: /docs/api/#editor 20 | - title: Events 21 | url: /docs/api/#events 22 | - title: Model 23 | url: /docs/api/#model 24 | - title: Extension 25 | url: /docs/api/#extension 26 | - title: Delta 27 | url: /docs/delta/ 28 | - title: Modules 29 | url: /docs/modules/ 30 | children: 31 | - title: Toolbar 32 | url: /docs/modules/toolbar/ 33 | - title: Keyboard 34 | url: /docs/modules/keyboard/ 35 | - title: History 36 | url: /docs/modules/history/ 37 | - title: Clipboard 38 | url: /docs/modules/clipboard/ 39 | - title: Formula 40 | url: /docs/modules/formula/ 41 | - title: Syntax 42 | url: /docs/modules/syntax/ 43 | - title: Themes 44 | url: /docs/themes/ 45 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/_includes/full-toolbar.html: -------------------------------------------------------------------------------- 1 | 2 | 7 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/_posts/2016-05-03-quill-1-0-beta-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | permalink: /blog/quill-1-0-beta-release/ 4 | title: Quill 1.0 Beta Release 5 | --- 6 | 7 | Today Quill is ready for its first beta preview of 1.0. This is the biggest rewrite to Quill since its inception and enables many new possibilities not available in previous versions of Quill, nor any other editor. The code is as always available on Github and through npm: 8 | 9 | ``` 10 | npm install quill@1.0.0-beta.0 11 | ``` 12 | 13 | The skeleton of a new documentation site is also being built out at [beta.quilljs.com](http://beta.quilljs.com). Whereas the current site focuses on being a referential resource, the new site will also be a guide to provide insight on approaching different customization goals. There is also an [interactive playground](http://beta.quilljs.com/playground/) to try out various configurations and explore the API. 14 | 15 | 16 | 17 | The goal now is of course an official 1.0 release. To get there, Quill will now enter a weekly cadence of beta releases, so you can expect rapid interations on stability and bug fixes each week. Github is still the center of all development so please do report [Issues](https://github.com/quilljs/quill/issues) as you encounter them in the beta preview. 18 | -------------------------------------------------------------------------------- /quilljs-source-code/test/unit/formats/header.js: -------------------------------------------------------------------------------- 1 | import Delta from 'quill-delta'; 2 | import Editor from '../../../core/editor'; 3 | 4 | 5 | describe('Header', function() { 6 | it('add', function() { 7 | let editor = this.initialize(Editor, '0123
'); 8 | editor.formatText(4, 1, { header: 1 }); 9 | expect(editor.getDelta()).toEqual(new Delta() 10 | .insert('0123', { italic: true }) 11 | .insert('\n', { header: 1 }) 12 | ); 13 | expect(editor.scroll.domNode).toEqualHTML('0123
'); 24 | }); 25 | 26 | it('change', function() { 27 | let editor = this.initialize(Editor, 'Hello World!
17 |Some initial bold text
18 |0123
'); 8 | editor.formatText(4, 1, { align: 'center' }); 9 | expect(editor.getDelta()).toEqual(new Delta().insert('0123').insert('\n', { align: 'center' })); 10 | expect(editor.scroll.domNode).toEqualHTML('0123
'); 11 | }); 12 | 13 | it('remove', function() { 14 | let editor = this.initialize(Editor, '0123
'); 15 | editor.formatText(4, 1, { align: false }); 16 | expect(editor.getDelta()).toEqual(new Delta().insert('0123\n')); 17 | expect(editor.scroll.domNode).toEqualHTML('0123
'); 18 | }); 19 | 20 | it('whitelist', function() { 21 | let editor = this.initialize(Editor, '0123
') 22 | let initial = editor.scroll.domNode.innerHTML; 23 | editor.formatText(4, 1, { align: 'middle' }); 24 | expect(editor.getDelta()).toEqual(new Delta().insert('0123').insert('\n', { align: 'center' })); 25 | expect(editor.scroll.domNode).toEqualHTML(initial); 26 | }); 27 | 28 | it('invalid scope', function() { 29 | let editor = this.initialize(Editor, '0123
'); 30 | let initial = editor.scroll.domNode.innerHTML; 31 | editor.formatText(1, 2, { align: 'center' }); 32 | expect(editor.getDelta()).toEqual(new Delta().insert('0123\n')); 33 | expect(editor.scroll.domNode).toEqualHTML(initial); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /quilljs-source-code/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Jason Chen 2 | Copyright (c) 2013, salesforce.com 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 21 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 23 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/table-border-none.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quilljs-source-code/blots/inline.js: -------------------------------------------------------------------------------- 1 | import Embed from './embed'; 2 | import Text from './text'; 3 | import Parchment from 'parchment'; 4 | 5 | 6 | class Inline extends Parchment.Inline { 7 | static compare(self, other) { 8 | let selfIndex = Inline.order.indexOf(self); 9 | let otherIndex = Inline.order.indexOf(other); 10 | if (selfIndex >= 0 || otherIndex >= 0) { 11 | return selfIndex - otherIndex; 12 | } else if (self === other) { 13 | return 0; 14 | } else if (self < other) { 15 | return -1; 16 | } else { 17 | return 1; 18 | } 19 | } 20 | 21 | formatAt(index, length, name, value) { 22 | if (Inline.compare(this.statics.blotName, name) < 0 && Parchment.query(name, Parchment.Scope.BLOT)) { 23 | let blot = this.isolate(index, length); 24 | if (value) { 25 | blot.wrap(name, value); 26 | } 27 | } else { 28 | super.formatAt(index, length, name, value); 29 | } 30 | } 31 | 32 | optimize() { 33 | super.optimize(); 34 | if (this.parent instanceof Inline && 35 | Inline.compare(this.statics.blotName, this.parent.statics.blotName) > 0) { 36 | let parent = this.parent.isolate(this.offset(), this.length()); 37 | this.moveChildren(parent); 38 | parent.wrap(this); 39 | } 40 | } 41 | } 42 | Inline.allowedChildren = [Inline, Embed, Text]; 43 | // Lower index means deeper in the DOM tree, since not found (-1) is for embeds 44 | Inline.order = [ 45 | 'cursor', 'inline', // Must be lower 46 | 'code', 'underline', 'strike', 'italic', 'bold', 'script', 47 | 'link' // Must be higher 48 | ]; 49 | 50 | 51 | export default Inline; 52 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/docs/download.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: docs 3 | title: Download 4 | permalink: /docs/download/ 5 | --- 6 | 7 | Quill comes ready to use in several convenient forms. 8 | 9 | 10 | ### CDN 11 | 12 | A globally distributed and available CDN is provided, backed by [Amazon Cloudfront](https://aws.amazon.com/cloudfront/). 13 | 14 | ```html 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | ``` 27 | 28 | 29 | ### NPM 30 | 31 | Add Quill as an [NPM](//www.npmjs.org/) dependency and add it your own build workflow, or use the included built options. Compiled stylesheets are also included in `dist/` folder. 32 | 33 | ```bash 34 | npm install quill@{{site.version}} 35 | ``` 36 | 37 | 38 | ### Direct Download 39 | 40 | Quill builds are also available for direct download on every [release](https://github.com/quilljs/quill/releases/tag/v{{site.version}}). 41 | 42 | 43 | ### Source 44 | 45 | And of course the complete source code is always available on [Github](https://github.com/quilljs/quill). 46 | 47 | ```bash 48 | git clone git@github.com:quilljs/quill.git 49 | ``` 50 | -------------------------------------------------------------------------------- /quilljs-source-code/test/unit/formats/color.js: -------------------------------------------------------------------------------- 1 | import Delta from 'quill-delta'; 2 | import Editor from '../../../core/editor'; 3 | 4 | 5 | describe('Color', function() { 6 | it('add', function() { 7 | let editor = this.initialize(Editor, '0123
'); 8 | editor.formatText(1, 2, { color: 'red' }); 9 | expect(editor.getDelta()).toEqual(new Delta() 10 | .insert('0') 11 | .insert('12', { color: 'red' }) 12 | .insert('3\n') 13 | ); 14 | expect(editor.scroll.domNode).toEqualHTML('0123
'); 15 | }); 16 | 17 | it('remove', function() { 18 | let editor = this.initialize(Editor, '0123
'); 19 | editor.formatText(1, 2, { color: false }); 20 | let delta = new Delta().insert('0').insert('12', { bold: true }).insert('3\n'); 21 | expect(editor.getDelta()).toEqual(delta); 22 | expect(editor.scroll.domNode).toEqualHTML('0123
'); 23 | }); 24 | 25 | it('remove unwrap', function() { 26 | let editor = this.initialize(Editor, '0123
'); 27 | editor.formatText(1, 2, { color: false }); 28 | expect(editor.getDelta()).toEqual(new Delta().insert('0123\n')); 29 | expect(editor.scroll.domNode).toEqualHTML('0123
'); 30 | }); 31 | 32 | it('invalid scope', function() { 33 | let editor = this.initialize(Editor, '0123
'); 34 | let initial = editor.scroll.domNode.innerHTML; 35 | editor.formatText(4, 1, { color: 'red' }); 36 | expect(editor.getDelta()).toEqual(new Delta().insert('0123\n')); 37 | expect(editor.scroll.domNode).toEqualHTML(initial); 38 | }); 39 | }); 40 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/docs/api/editor.md: -------------------------------------------------------------------------------- 1 | ## Editor 2 | 3 | ### blur 4 | 5 | Removes focus from the editor. 6 | 7 | **Methods** 8 | 9 | ```javascript 10 | blur() 11 | ``` 12 | 13 | **Examples** 14 | 15 | ```javascript 16 | quill.blur(); 17 | ``` 18 | 19 | ### disable 20 | 21 | Shorthand for [`enable(false)`](#enable). 22 | 23 | ### enable 24 | 25 | Set ability for user to edit, via input devices like the mouse or keyboard. Does not affect capabilities of API calls, when the `source` is `"api"` or `"silent". 26 | 27 | **Methods** 28 | 29 | ```javascript 30 | enable(enabled: boolean = true) 31 | ``` 32 | 33 | **Examples** 34 | 35 | ```javascript 36 | quill.enable(); 37 | quill.enable(false); // Disables user input 38 | ``` 39 | 40 | ### focus 41 | 42 | Focuses the editor and restores its last range. 43 | 44 | **Methods** 45 | 46 | ```javascript 47 | focus() 48 | ``` 49 | 50 | **Examples** 51 | 52 | ```javascript 53 | quill.focus(); 54 | ``` 55 | 56 | ### hasFocus 57 | 58 | Checks if editor has focus. Note focus on toolbar, tooltips, does not count as the editor. 59 | 60 | **Methods** 61 | 62 | ```javascript 63 | hasFocus(): Boolean 64 | ``` 65 | 66 | **Examples** 67 | 68 | ```javascript 69 | quill.hasFocus(); 70 | ``` 71 | 72 | ### update 73 | 74 | Synchronously check editor for user updates and fires events, if changes have occurred. Useful for collaborative use cases during conflict resolution requiring the latest up to date state. [Source](/docs/api/#events) may be `"user"`, `"api"`, or `"silent"`. 75 | 76 | **Methods** 77 | 78 | ```javascript 79 | update(source: String = 'user') 80 | ``` 81 | 82 | **Examples** 83 | 84 | ```javascript 85 | quill.update(); 86 | ``` 87 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/table-border-right.svg: -------------------------------------------------------------------------------- 1 | 29 | -------------------------------------------------------------------------------- /quilljs-source-code/blots/contain.js: -------------------------------------------------------------------------------- 1 | import Parchment from 'parchment'; 2 | import Container from './container'; 3 | import Block, { BlockEmbed } from './block'; 4 | 5 | 6 | class ContainBlot extends Container { 7 | 8 | static randomId() { 9 | return Math.random().toString(36).slice(2) 10 | } 11 | 12 | static create(value) { 13 | let tagName = 'contain'; 14 | let node = super.create(tagName); 15 | if(value == true) { 16 | value = this.randomId(); 17 | } 18 | node.setAttribute('id', value); 19 | return node; 20 | } 21 | 22 | insertBefore(blot, ref) { 23 | if (blot.statics.blotName == this.statics.blotName) { 24 | // console.log('############################ Not sure this is clean:') // eslint-disable-line 25 | // console.log(blot) // eslint-disable-line 26 | // console.log(blot.children.head) // eslint-disable-line 27 | super.insertBefore(blot.children.head, ref); 28 | } else { 29 | super.insertBefore(blot, ref); 30 | } 31 | } 32 | 33 | static formats(domNode) { 34 | return domNode.getAttribute('id'); 35 | } 36 | 37 | formats() { 38 | // We don't inherit from FormatBlot 39 | return { [this.statics.blotName]: this.statics.formats(this.domNode) } 40 | } 41 | 42 | replace(target) { 43 | if (target.statics.blotName !== this.statics.blotName) { 44 | let item = Parchment.create(this.statics.defaultChild); 45 | target.moveChildren(item); 46 | this.appendChild(item); 47 | } 48 | if (target.parent == null) return; 49 | super.replace(target) 50 | } 51 | 52 | } 53 | 54 | ContainBlot.blotName = 'contain'; 55 | ContainBlot.tagName = 'contain'; 56 | ContainBlot.scope = Parchment.Scope.BLOCK_BLOT; 57 | ContainBlot.defaultChild = 'block'; 58 | ContainBlot.allowedChildren = [Block, BlockEmbed, Container]; 59 | 60 | 61 | export default ContainBlot; 62 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/table-border-bottom.svg: -------------------------------------------------------------------------------- 1 | 29 | -------------------------------------------------------------------------------- /quilljs-source-code/ui/tooltip.js: -------------------------------------------------------------------------------- 1 | class Tooltip { 2 | constructor(quill, boundsContainer) { 3 | this.quill = quill; 4 | this.boundsContainer = boundsContainer || document.body; 5 | this.root = quill.addContainer('ql-tooltip'); 6 | this.root.innerHTML = this.constructor.TEMPLATE; 7 | this.quill.root.addEventListener('scroll', () => { 8 | this.root.style.marginTop = (-1*this.quill.root.scrollTop) + 'px'; 9 | }); 10 | this.hide(); 11 | } 12 | 13 | hide() { 14 | this.root.classList.add('ql-hidden'); 15 | } 16 | 17 | position(reference) { 18 | let left = reference.left + reference.width/2 - this.root.offsetWidth/2; 19 | let top = reference.bottom + this.quill.root.scrollTop; 20 | this.root.style.left = left + 'px'; 21 | this.root.style.top = top + 'px'; 22 | this.root.classList.remove('ql-flip'); 23 | let containerBounds = this.boundsContainer.getBoundingClientRect(); 24 | let rootBounds = this.root.getBoundingClientRect(); 25 | let shift = 0; 26 | if (rootBounds.right > containerBounds.right) { 27 | shift = containerBounds.right - rootBounds.right; 28 | this.root.style.left = (left + shift) + 'px'; 29 | } 30 | if (rootBounds.left < containerBounds.left) { 31 | shift = containerBounds.left - rootBounds.left; 32 | this.root.style.left = (left + shift) + 'px'; 33 | } 34 | if (rootBounds.bottom > containerBounds.bottom) { 35 | let height = rootBounds.bottom - rootBounds.top; 36 | let verticalShift = containerBounds.bottom - rootBounds.bottom - height; 37 | this.root.style.top = (top + verticalShift) + 'px'; 38 | this.root.classList.add('ql-flip'); 39 | } 40 | return shift; 41 | } 42 | 43 | show() { 44 | this.root.classList.remove('ql-editing'); 45 | this.root.classList.remove('ql-hidden'); 46 | } 47 | } 48 | 49 | 50 | export default Tooltip; 51 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/docs/api/selection.md: -------------------------------------------------------------------------------- 1 | ## Selection 2 | 3 | ### getBounds 4 | 5 | Retrieves the pixel position (relative to the editor container) and dimensions of a selection at a given location. The user's current selection need not be at that index. Useful for calculating where to place tooltips. 6 | 7 | **Methods** 8 | 9 | ```javascript 10 | getBounds(index: Number, length: Number = 0): 11 | { left: Number, top: Number, height: Number, width: Number } 12 | ``` 13 | 14 | **Examples** 15 | 16 | ```javascript 17 | quill.setText('Hello\nWorld\n'); 18 | quill.getBounds(7); // Returns { height: 15, width: 0, left: 27, top: 31 } 19 | ``` 20 | 21 | ### getSelection 22 | 23 | Retrieves the user's selection range, optionally to focus the editor first. Otherwise `null` may be returned if editor does not have focus. 24 | 25 | **Methods** 26 | 27 | ```javascript 28 | getSelection(focus = false): { index: Number, length: Number } 29 | ``` 30 | 31 | **Examples** 32 | 33 | ```javascript 34 | var range = quill.getSelection(); 35 | if (range) { 36 | if (range.length == 0) { 37 | console.log('User cursor is at index', range.index); 38 | } else { 39 | var text = quill.getText(range.index, range.length); 40 | console.log('User has highlighted: ', text); 41 | } 42 | } else { 43 | console.log('User cursor is not in editor'); 44 | } 45 | ``` 46 | 47 | ### setSelection 48 | 49 | Sets user selection to given range, which will also focus the editor. Providing `null` as the selection range will blur the editor. [Source](/docs/api/#events) may be `"user"`, `"api"`, or `"silent"`. 50 | 51 | **Methods** 52 | 53 | ```javascript 54 | setSelection(index: Number, length: Number, source: String = 'api') 55 | setSelection(range: { index: Number, length: Number }, 56 | souce: String = 'api') 57 | ``` 58 | 59 | **Examples** 60 | 61 | ```javascript 62 | quill.setSelection(0, 5); 63 | ``` 64 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/_includes/header.html: -------------------------------------------------------------------------------- 1 |0123
'); 9 | editor.formatText(1, 2, { link: 'https://quilljs.com' }); 10 | expect(editor.getDelta()).toEqual(new Delta() 11 | .insert('0') 12 | .insert('12', { link: 'https://quilljs.com' }) 13 | .insert('3\n') 14 | ); 15 | expect(editor.scroll.domNode).toEqualHTML('0123
'); 16 | }); 17 | 18 | it('add invalid', function() { 19 | let editor = this.initialize(Editor, '0123
'); 20 | editor.formatText(1, 2, { link: 'javascript:alert(0);' }); // eslint-disable-line no-script-url 21 | expect(editor.getDelta()).toEqual(new Delta() 22 | .insert('0') 23 | .insert('12', { link: Link.SANITIZED_URL }) 24 | .insert('3\n') 25 | ); 26 | }); 27 | 28 | it('change', function() { 29 | let editor = this.initialize(Editor, '0123
'); 30 | editor.formatText(1, 2, { link: 'https://quilljs.com' }); 31 | expect(editor.getDelta()).toEqual(new Delta() 32 | .insert('0') 33 | .insert('12', { link: 'https://quilljs.com' }) 34 | .insert('3\n') 35 | ); 36 | expect(editor.scroll.domNode).toEqualHTML('0123
'); 37 | }); 38 | 39 | it('remove', function() { 40 | let editor = this.initialize(Editor, '0123
'); 41 | editor.formatText(1, 2, { link: false }); 42 | let delta = new Delta().insert('0').insert('12', { size: 'large' }).insert('3\n'); 43 | expect(editor.getDelta()).toEqual(delta); 44 | expect(editor.scroll.domNode).toEqualHTML('0123
'); 45 | }); 46 | }); 47 | -------------------------------------------------------------------------------- /quilljs-source-code/_develop/karma.config.js: -------------------------------------------------------------------------------- 1 | var browsers = require('./browsers'); 2 | var sauce = require('./sauce'); 3 | 4 | 5 | module.exports = function(config) { 6 | config.set({ 7 | basePath: '../', 8 | urlRoot: '/karma/', 9 | port: process.env.npm_package_config_ports_karma, 10 | 11 | files: [ 12 | { pattern: 'dist/quill.snow.css', nocache: true }, 13 | { pattern: 'dist/unit.js', nocache: true }, 14 | { pattern: 'dist/*.map', included: false, served: true, nocache: true }, 15 | { pattern: 'assets/favicon.png', included: false, served: true } 16 | ], 17 | proxies: { 18 | '/assets/': '/karma/base/assets/' 19 | }, 20 | 21 | frameworks: ['jasmine'], 22 | reporters: ['progress'], 23 | colors: true, 24 | autoWatch: false, 25 | singleRun: true, 26 | browsers: ['Chrome'], 27 | 28 | client: { 29 | useIframe: false 30 | }, 31 | 32 | coverageReporter: { 33 | dir: '.coverage', 34 | reporters: [ 35 | { type: 'text' }, 36 | { type: 'html' } 37 | ] 38 | }, 39 | sauceLabs: { 40 | testName: 'quill-unit', 41 | options: { 42 | 'public': 'public', 43 | 'record-screenshots': false 44 | }, 45 | build: sauce.build, 46 | username: sauce.username, 47 | accessKey: sauce.accessKey, 48 | tunnelIdentifier: sauce.tunnel 49 | }, 50 | customLaunchers: browsers 51 | }); 52 | 53 | if (process.env.TRAVIS) { 54 | config.sauceLabs.startConnect = false; 55 | config.transports = ['polling']; 56 | config.browsers = [process.env.BROWSER]; 57 | config.browserDisconnectTimeout = 10000; 58 | config.browserDisconnectTolerance = 3; 59 | config.browserNoActivityTimeout = 60000; 60 | config.captureTimeout = 120000; 61 | // MS Edge does not work in an iframe 62 | if (process.env.BROWSER.indexOf('ios') > -1 || 63 | process.env.BROWSER.indexOf('android') > -1 || 64 | process.env.BROWSER.indexOf('firefox') > -1) { 65 | config.client.useIframe = true; 66 | } 67 | } 68 | }; 69 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/docs/modules.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: docs 3 | title: Modules 4 | permalink: /docs/modules/ 5 | redirect_from: 6 | - /docs/modules/authorship/ 7 | - /docs/modules/multi-cursors/ 8 | --- 9 | 10 | Modules allow Quill's behavior and functionality to be customized. Several officially supported modules are available to pick and choose from, some with additional configuration options and APIs. Refer to their respective documentation pages for more details. 11 | 12 | To enable a module, simply include it in Quill's configuration. 13 | 14 | ```javascript 15 | var quill = new Quill('#editor', { 16 | modules: { 17 | 'history': { // Enable with custom configurations 18 | 'delay': 2500, 19 | 'userOnly': true 20 | }, 21 | 'syntax': true // Enable with default configuration 22 | } 23 | }); 24 | ``` 25 | 26 | The [Clipboard](/docs/modules/clipboard/), [Keyboard](/docs/modules/keyboard/), and [History](/docs/modules/history/) modules are required by Quill and do not need to be included explictly, but may be configured like any other module. 27 | 28 | 29 | ## Extending 30 | 31 | Modules may also be extended and re-registered, replacing the original module. Even required modules may be re-registered and replaced. 32 | 33 | ```javascript 34 | var Clipboard = Quill.import('modules/clipboard'); 35 | var Delta = Quill.import('delta'); 36 | 37 | class PlainClipboard extends Clipboard { 38 | convert(html = null) { 39 | if (typeof html === 'string') { 40 | this.container.innerHTML = html; 41 | } 42 | return new Delta().insert(this.container.innerText); 43 | } 44 | } 45 | 46 | Quill.register('modules/clipboard', PlainClipboard, true); 47 | 48 | // Will be created with instance of PlainClipboard 49 | var quill = new Quill('#editor'); 50 | ``` 51 | 52 | *Note: This particular example was selected to show what is possible. It is often easier to just use an API or configuration the existing module exposes. In this example, the existing Clipboard's [addMatcher](/docs/modules/clipboard/#addmatcher) API is suitable for most paste customization scenarios.* 53 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/_posts/2016-03-14-are-we-there-yet-to-1-0.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | permalink: /blog/are-we-there-yet-to-1-0/ 4 | title: Are We There Yet (to 1.0)? 5 | --- 6 | 7 | When Quill laid out its [1.0 roadmap](/blog/the-road-to-1-0/), core to its journey was the development of a new document model called Parchment. Today a beta release of Parchment is being made available on [Github](https://github.com/quilljs/parchment) and [NPM](https://www.npmjs.com/package/parchment). 8 | 9 | What this means is its design and API is reasonably stable and the adventurous can now take an early look. The latest Quill source is already using Parchment to implement its formatting and content capabilities, and its [integration](https://github.com/quilljs/quill/tree/develop/formats) would be a helpful example of Parchment in action. Of course, this is in addition to Parchment’s own [documentation](https://github.com/quilljs/parchment/blob/master/README.md). 10 | 11 | 12 | 13 | 14 | ### New Formats 15 | 16 | Parchment enables Quill to scalably support many formats and many are being added in 1.0. The list includes headers, blockquotes, code, superscript, subscript, text direction, nested lists, and video embeds. Syntax highlighted code and formulas will also be available through externally supported modules. In addition, formats that previously relied on style attributes are reimplemented to optionally use classes instead. By default, fonts, sizes, and text alignment will use classes, while foreground and background colors will still use style attributes, since there are so many possible color values. 17 | 18 | 19 | ### Quill 1.0 Beta 20 | 21 | With Parchment out of the way, Quill is nearing its own 1.0 release. This will also be prefaced with a beta period, optimistically planned for early April. You can also set up the [local development](https://github.com/quilljs/quill/blob/develop/.github/CONTRIBUTING.md#local-development) environment to follow along with the latest changes and progress. 22 | 23 | If you are currently using Quill at your company or project, we'd love to hear about your use case [hello@quilljs.com](mailto:hello@quilljs.com)! 24 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/docs/modules/history.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: docs 3 | title: History Module 4 | permalink: /docs/modules/history/ 5 | --- 6 | 7 | The History module is responsible for handling undo and redo for Quill. It can be configured with the following options: 8 | 9 | ## Configuration 10 | 11 | #### delay 12 | 13 | - Default: `1000` 14 | 15 | Changes occuring within the `delay` number of milliseconds is merged into a single change. 16 | 17 | For example, with delay set to `0`, nearly every character is recorded as one change and so undo would undo one character at a time. With delay set to `1000`, undo would undo all changes that occured within the last 1000 milliseconds. 18 | 19 | 20 | #### maxStack 21 | 22 | - Default: `100` 23 | 24 | Maximum size of the history's undo/redo stack. Merged changes with the `delay` option counts as a singular change. 25 | 26 | 27 | #### userOnly 28 | 29 | - Default: `false` 30 | 31 | By default all changes, whether originating from user input or programmatically through the API, are treated the same and change be undone or redone by the history module. If `userOnly` is set to `true`, only user changes will be undone or redone. 32 | 33 | 34 | ### Example 35 | 36 | ```javascript 37 | var quill = new Quill('#editor', { 38 | modules: { 39 | history: { 40 | delay: 2000, 41 | maxStack: 500, 42 | userOnly: true 43 | } 44 | }, 45 | theme: 'snow' 46 | }); 47 | ``` 48 | 49 | ## API 50 | 51 | #### clear 52 | 53 | Clears the history stack. 54 | 55 | **Methods** 56 | 57 | ```js 58 | clear() 59 | ``` 60 | 61 | **Examples** 62 | 63 | ```js 64 | quill.history.clear(); 65 | ``` 66 | 67 | 68 | #### undo 69 | 70 | Undo last change. 71 | 72 | **Methods** 73 | 74 | ```js 75 | undo() 76 | ``` 77 | 78 | **Examples** 79 | 80 | ```js 81 | quill.history.undo(); 82 | ``` 83 | 84 | 85 | #### redo 86 | 87 | If last change was an undo, redo this undo. Otherwise does nothing. 88 | 89 | **Methods** 90 | 91 | ```js 92 | redo() 93 | ``` 94 | 95 | **Examples** 96 | 97 | ```js 98 | quill.history.redo(); 99 | ``` 100 | -------------------------------------------------------------------------------- /quilljs-source-code/core/polyfill.js: -------------------------------------------------------------------------------- 1 | let elem = document.createElement('div'); 2 | elem.classList.toggle('test-class', false); 3 | if (elem.classList.contains('test-class')) { 4 | let _toggle = DOMTokenList.prototype.toggle; 5 | DOMTokenList.prototype.toggle = function(token, force) { 6 | if (arguments.length > 1 && !this.contains(token) === !force) { 7 | return force; 8 | } else { 9 | return _toggle.call(this, token); 10 | } 11 | }; 12 | } 13 | 14 | if (!String.prototype.startsWith) { 15 | String.prototype.startsWith = function(searchString, position){ 16 | position = position || 0; 17 | return this.substr(position, searchString.length) === searchString; 18 | }; 19 | } 20 | 21 | if (!String.prototype.endsWith) { 22 | String.prototype.endsWith = function(searchString, position) { 23 | var subjectString = this.toString(); 24 | if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) { 25 | position = subjectString.length; 26 | } 27 | position -= searchString.length; 28 | var lastIndex = subjectString.indexOf(searchString, position); 29 | return lastIndex !== -1 && lastIndex === position; 30 | }; 31 | } 32 | 33 | if (!Array.prototype.find) { 34 | Object.defineProperty(Array.prototype, "find", { 35 | value: function(predicate) { 36 | if (this === null) { 37 | throw new TypeError('Array.prototype.find called on null or undefined'); 38 | } 39 | if (typeof predicate !== 'function') { 40 | throw new TypeError('predicate must be a function'); 41 | } 42 | var list = Object(this); 43 | var length = list.length >>> 0; 44 | var thisArg = arguments[1]; 45 | var value; 46 | 47 | for (var i = 0; i < length; i++) { 48 | value = list[i]; 49 | if (predicate.call(thisArg, value, i, list)) { 50 | return value; 51 | } 52 | } 53 | return undefined; 54 | } 55 | }); 56 | } 57 | 58 | // Disable resizing in Firefox 59 | document.addEventListener("DOMContentLoaded", function() { 60 | document.execCommand("enableObjectResizing", false, false); 61 | }); 62 | -------------------------------------------------------------------------------- /quilljs-source-code/_develop/browsers.js: -------------------------------------------------------------------------------- 1 | var desktop = { 2 | 'mac-chrome-latest' : ['OS X 10.11', 'chrome', '54.0'], 3 | 'mac-firefox-latest' : ['OS X 10.11', 'firefox', '50.0'], 4 | 'mac-safari-latest' : ['OS X 10.11', 'safari', '10.0'], 5 | 'mac-chrome-previous' : ['OS X 10.10', 'chrome', '53.0'], 6 | 'mac-firefox-previous' : ['OS X 10.10', 'firefox', '49.0'], 7 | 'mac-safari-previous' : ['OS X 10.10', 'safari', '9.0'], 8 | 9 | 'windows-chrome-latest' : ['Windows 10', 'chrome', '54.0'], 10 | 'windows-firefox-latest' : ['Windows 10', 'firefox', '50.0'], 11 | 'windows-edge-latest' : ['Windows 10', 'microsoftedge', '14.14393'], 12 | 'windows-ie-latest' : ['Windows 8.1', 'internet explorer', '11.0'], 13 | 'windows-chrome-previous' : ['Windows 8.1', 'chrome', '53.0'], 14 | 'windows-firefox-previous': ['Windows 8.1', 'firefox', '49.0'], 15 | 'windows-edge-previous' : ['Windows 10', 'microsoftedge', '13.10586'], 16 | 17 | 'linux-chrome-latest' : ['Linux', 'chrome', '48.0'], 18 | 'linux-firefox-latest' : ['Linux', 'firefox', '45.0'], 19 | 'linux-chrome-previous' : ['Linux', 'chrome', '47.0'], 20 | 'linux-firefox-previous' : ['Linux', 'firefox', '44.0'] 21 | }; 22 | 23 | var mobile = { 24 | 'ios-latest' : ['iPhone 7 Plus', 'iOS', '10.0', 'Safari'], 25 | 'ios-previous' : ['iPhone 6 Plus', 'iOS', '9.3', 'Safari'], 26 | 27 | 'android-latest' : ['Android Emulator', 'Android', '5.1', 'Browser'], 28 | 'android-previous' : ['Android Emulator', 'Android', '5.0', 'Browser'] 29 | }; 30 | 31 | Object.keys(desktop).forEach(function(key) { 32 | module.exports[key] = { 33 | base: 'SauceLabs', 34 | browserName: desktop[key][1], 35 | version: desktop[key][2], 36 | platform: desktop[key][0] 37 | }; 38 | }); 39 | 40 | Object.keys(mobile).forEach(function(key) { 41 | var appiumVersion = key.startsWith('ios') ? '1.6.3' : '1.5.3'; 42 | module.exports[key] = { 43 | base: 'SauceLabs', 44 | browserName: mobile[key][3], 45 | appiumVersion: appiumVersion, 46 | deviceName: mobile[key][0], 47 | deviceOrientation: 'portrait', 48 | platformVersion: mobile[key][2], 49 | platformName: mobile[key][1] 50 | }; 51 | }); 52 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/table-border-left.svg: -------------------------------------------------------------------------------- 1 | 29 | -------------------------------------------------------------------------------- /quilljs-source-code/ui/icons.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'align': { 3 | '' : require('../assets/icons/align-left.svg'), 4 | 'center' : require('../assets/icons/align-center.svg'), 5 | 'right' : require('../assets/icons/align-right.svg'), 6 | 'justify' : require('../assets/icons/align-justify.svg') 7 | }, 8 | 'background': require('../assets/icons/background.svg'), 9 | 'blockquote': require('../assets/icons/blockquote.svg'), 10 | 'bold' : require('../assets/icons/bold.svg'), 11 | 'clean' : require('../assets/icons/clean.svg'), 12 | 'code' : require('../assets/icons/code.svg'), 13 | 'code-block': require('../assets/icons/code.svg'), 14 | 'color' : require('../assets/icons/color.svg'), 15 | 'direction' : { 16 | '' : require('../assets/icons/direction-ltr.svg'), 17 | 'rtl' : require('../assets/icons/direction-rtl.svg') 18 | }, 19 | 'float': { 20 | 'center' : require('../assets/icons/float-center.svg'), 21 | 'full' : require('../assets/icons/float-full.svg'), 22 | 'left' : require('../assets/icons/float-left.svg'), 23 | 'right' : require('../assets/icons/float-right.svg') 24 | }, 25 | 'formula' : require('../assets/icons/formula.svg'), 26 | 'header': { 27 | '1' : require('../assets/icons/header.svg'), 28 | '2' : require('../assets/icons/header-2.svg') 29 | }, 30 | 'italic' : require('../assets/icons/italic.svg'), 31 | 'image' : require('../assets/icons/image.svg'), 32 | 'indent': { 33 | '+1' : require('../assets/icons/indent.svg'), 34 | '-1' : require('../assets/icons/outdent.svg') 35 | }, 36 | 'link' : require('../assets/icons/link.svg'), 37 | 'list': { 38 | 'ordered' : require('../assets/icons/list-ordered.svg'), 39 | 'bullet' : require('../assets/icons/list-bullet.svg'), 40 | 'check' : require('../assets/icons/list-check.svg') 41 | }, 42 | 'script': { 43 | 'sub' : require('../assets/icons/subscript.svg'), 44 | 'super' : require('../assets/icons/superscript.svg'), 45 | }, 46 | 'strike' : require('../assets/icons/strike.svg'), 47 | 'underline' : require('../assets/icons/underline.svg'), 48 | 'video' : require('../assets/icons/video.svg') 49 | }; 50 | -------------------------------------------------------------------------------- /quilljs-source-code/assets/icons/table-border-top.svg: -------------------------------------------------------------------------------- 1 | 29 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/playground.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Interactive Playground 4 | permalink: /playground/ 5 | redirect_from: 6 | - /examples/ 7 | pens: 8 | - title: Autosave 9 | slug: RRYBEP 10 | - title: Class vs Inline Style 11 | slug: jAvpQL 12 | - title: Form Submit 13 | slug: kXRjQJ 14 | - title: Snow Toolbar Tooltips 15 | slug: ozYEro 16 | - title: Autogrow Height 17 | slug: dOqrVm 18 | - title: Custom Fonts 19 | slug: gLBYam 20 | - title: Quill Playground 21 | slug: KzZqZx 22 | --- 23 | 24 |
34 | {{pen.title}}
35 |
36 | Hello World!
'); 26 | scroll.insertAt(6, 'pardon\nthis\n\ninterruption\n'); 27 | expect(scroll.domNode).toEqualHTML(` 28 |Hello pardon
29 |this
30 |interruption
32 |World!
33 | `); 34 | }); 35 | 36 | it('insert into formatted', function() { 37 | let scroll = this.initialize(Scroll, 'Hello
World!
'); 45 | scroll.deleteAt(0, 5); 46 | expect(scroll.domNode).toEqualHTML('World!
'); 47 | }); 48 | 49 | it('join lines', function() { 50 | let scroll = this.initialize(Scroll, 'HelloWorld
HelloWorld
'); 59 | }); 60 | 61 | it('join empty lines', function() { 62 | let scroll = this.initialize(Scroll, 'Test
'); 81 | scroll.children.head.domNode.appendChild(document.createElement('br')); 82 | scroll.update(); 83 | expect(scroll.domNode).toEqualHTML('Test
'); 84 | }); 85 | }); 86 | -------------------------------------------------------------------------------- /quilljs-source-code/test/unit/blots/scroll.js: -------------------------------------------------------------------------------- 1 | import Parchment from 'parchment'; 2 | import Emitter from '../../../core/emitter'; 3 | import Selection, { Range } from '../../../core/selection'; 4 | import Cursor from '../../../blots/cursor'; 5 | import Scroll from '../../../blots/scroll'; 6 | 7 | 8 | describe('Scroll', function() { 9 | it('initialize empty document', function() { 10 | let scroll = this.initialize(Scroll, ''); 11 | expect(scroll.domNode).toEqualHTML('Hello World!
'); 16 | spyOn(scroll.emitter, 'emit').and.callThrough(); 17 | scroll.insertAt(5, '!'); 18 | expect(scroll.emitter.emit).toHaveBeenCalledWith(Emitter.events.SCROLL_OPTIMIZE, jasmine.any(Array)); 19 | }); 20 | 21 | it('user change', function(done) { 22 | let scroll = this.initialize(Scroll, 'Hello World!
'); 23 | spyOn(scroll.emitter, 'emit').and.callThrough(); 24 | scroll.domNode.firstChild.appendChild(document.createTextNode('!')); 25 | setTimeout(function() { 26 | expect(scroll.emitter.emit).toHaveBeenCalledWith(Emitter.events.SCROLL_OPTIMIZE, jasmine.any(Array)); 27 | expect(scroll.emitter.emit).toHaveBeenCalledWith(Emitter.events.SCROLL_UPDATE, Emitter.sources.USER, jasmine.any(Array)); 28 | done(); 29 | }, 1); 30 | }); 31 | 32 | it('whitelist', function() { 33 | let scroll = Parchment.create('scroll', { emitter: new Emitter(), whitelist: ['bold'] }); 34 | scroll.insertAt(0, 'Hello World!'); 35 | scroll.formatAt(0, 5, 'bold', true); 36 | scroll.formatAt(6, 5, 'italic', true); 37 | expect(scroll.domNode.firstChild).toEqualHTML('Hello World!'); 38 | }); 39 | 40 | describe('leaf()', function() { 41 | it('text', function() { 42 | let scroll = this.initialize(Scroll, 'Tests
'); 43 | let [leaf, offset] = scroll.leaf(2); 44 | expect(leaf.value()).toEqual('Tests'); 45 | expect(offset).toEqual(2); 46 | }); 47 | 48 | it('precise', function() { 49 | let scroll = this.initialize(Scroll, '01234
0123
5678
'); 57 | let [leaf, offset] = scroll.leaf(4); 58 | expect(leaf.value()).toEqual('0123'); 59 | expect(offset).toEqual(4); 60 | }); 61 | 62 | it('cursor', function() { 63 | let selection = this.initialize(Selection, '012
'); 64 | selection.setRange(new Range(2)); 65 | selection.format('strike', true); 66 | let [leaf, offset] = selection.scroll.leaf(2); 67 | expect(leaf instanceof Cursor).toBe(true); 68 | expect(offset).toEqual(0); 69 | }); 70 | 71 | it('beyond document', function() { 72 | let scroll = this.initialize(Scroll, 'Test
'); 73 | let [leaf, offset] = scroll.leaf(10); 74 | expect(leaf).toEqual(null); 75 | expect(offset).toEqual(-1); 76 | }); 77 | }); 78 | }); 79 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/docs/api/model.md: -------------------------------------------------------------------------------- 1 | ## Model 2 | 3 | ### find experimental {#find-experimental} 4 | 5 | Static method returning the Quill or [Blot](https://github.com/quilljs/parchment) instance for the given DOM node. In the latter case, passing in true for the `bubble` parameter will search up the given DOM's ancestors until it finds a corresponding [Blot](https://github.com/quilljs/parchment). 6 | 7 | **Methods** 8 | 9 | ```javascript 10 | Quill.find(domNode: Node, bubble: boolean = false): Blot | Quill 11 | ``` 12 | 13 | **Examples** 14 | 15 | ```javascript 16 | var container = document.querySelector("#container"); 17 | var quill = new Quill(container); 18 | console.log(Quill.find(container) === quill); // Should be true 19 | 20 | quill.insertText(0, 'Hello', 'link', 'https://world.com'); 21 | var linkNode = document.querySelector('#container a'); 22 | var linkBlot = Quill.find(linkNode); 23 | ``` 24 | 25 | ### getIndex experimental {#getindex-experimental} 26 | 27 | Returns the distance between the beginning of document to the occurance of the given [Blot](https://github.com/quilljs/parchment). 28 | 29 | **Methods** 30 | 31 | ```javascript 32 | getIndex(blot: Blot): Number 33 | ``` 34 | 35 | **Examples** 36 | 37 | ```javascript 38 | let [line, offset] = quill.getLine(10); 39 | let index = quill.getIndex(line); // index + offset should == 10 40 | ``` 41 | 42 | ### getLeaf experimental {#getleaf-experimental} 43 | 44 | Returns the leaf [Blot](https://github.com/quilljs/parchment) at the specified index within the document. 45 | 46 | **Methods** 47 | 48 | ```javascript 49 | getLeaf(index: Number): Blot 50 | ``` 51 | 52 | **Examples** 53 | 54 | ```javascript 55 | quill.setText('Hello Good World!'); 56 | quill.formatText(6, 4, "bold", true); 57 | 58 | let [leaf, offset] = quill.getLeaf(7); 59 | // leaf should be a Text Blot with value "Good" 60 | // offset should be 1, since the returned leaf started at index 6 61 | ``` 62 | 63 | ### getLine experimental {#getline-experimental} 64 | 65 | Returns the line [Blot](https://github.com/quilljs/parchment) at the specified index within the document. 66 | 67 | **Methods** 68 | 69 | ```javascript 70 | getLine(index: Number): Blot 71 | ``` 72 | 73 | 74 | **Examples** 75 | 76 | ```javascript 77 | quill.setText('Hello\nWorld!'); 78 | 79 | let [line, offset] = quill.getLine(7); 80 | // line should be a Block Blot representing the 2nd "World!" line 81 | // offset should be 1, since the returned line started at index 6 82 | ``` 83 | 84 | ### getLines experimental {#getlines-experimental} 85 | 86 | Returns the lines contained within the specified location. 87 | 88 | **Methods** 89 | 90 | ```javascript 91 | getLines(index: Number = 0, length: Number = remaining): Blot[] 92 | getLines(range: Range): Blot[] 93 | ``` 94 | 95 | **Examples** 96 | 97 | ```javascript 98 | quill.setText('Hello\nGood\nWorld!'); 99 | quill.formatLine(1, 1, 'list', 'bullet'); 100 | 101 | let lines = quill.getLines(2, 5); 102 | // array witha a ListItem and Block Blot, 103 | // representing the first two lines 104 | ``` 105 | -------------------------------------------------------------------------------- /quilljs-source-code/docs/_layouts/v0.20.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |