How to use the quill.events function in quill

To help you get started, we’ve selected a few quill examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zenoamaro / react-quill / src / mixin.js View on Github external
editor.on('editor-change', function(eventType, rangeOrDelta, oldRangeOrOldDelta, source) {
			if (eventType === Quill.events.SELECTION_CHANGE) {
				this.handleSelectionChange(rangeOrDelta, oldRangeOrOldDelta, source);
			}
			
			if (eventType === Quill.events.TEXT_CHANGE) {
				this.handleTextChange(rangeOrDelta, oldRangeOrOldDelta, source);
			}
		}.bind(this));
	},
github NSFI / ppfish-components / lib / components / RichEditor / src / quill / mixin.js View on Github external
this.handleEditorChange = function (eventType, rangeOrDelta, oldRangeOrOldDelta, source) {
      if (eventType === Quill.events.SELECTION_CHANGE) {
        this.handleSelectionChange(rangeOrDelta, oldRangeOrOldDelta, source);
      }

      if (eventType === Quill.events.TEXT_CHANGE) {
        this.handleTextChange(rangeOrDelta, oldRangeOrOldDelta, source);
      }
    }.bind(this);
github austintoddj / canvas / resources / js / components / editor / QuillEditor.vue View on Github external
this.editor.on(Quill.events.EDITOR_CHANGE, (eventType, range) => {
                let sidebarControls = this.$refs.sidebarControls;

                if (eventType !== Quill.events.SELECTION_CHANGE) {
                    return;
                }

                if (range == null) {
                    return;
                }

                if (range.length === 0) {
                    let [block] = this.editor.scroll.descendant(Block, range.index);

                    if (block != null && block.domNode.firstChild instanceof HTMLBRElement) {
                        let lineBounds = this.editor.getBounds(range);
                        sidebarControls.classList.remove('active');
                        sidebarControls.style.display = 'block';
                        sidebarControls.style.left = lineBounds.left - 50 + 'px';
                        sidebarControls.style.top = lineBounds.top - 2 + 'px';
github NSFI / ppfish-components / source / components / RichEditor / src / quill / mixin.js View on Github external
this.handleEditorChange = function(eventType, rangeOrDelta, oldRangeOrOldDelta, source) {
			if (eventType === Quill.events.SELECTION_CHANGE) {
				this.handleSelectionChange(rangeOrDelta, oldRangeOrOldDelta, source);
			}

			if (eventType === Quill.events.TEXT_CHANGE) {
				this.handleTextChange(rangeOrDelta, oldRangeOrOldDelta, source);
			}
		}.bind(this);
github NSFI / ppfish-components / lib / components / RichEditor / src / quill / mixin.js View on Github external
this.handleEditorChange = function (eventType, rangeOrDelta, oldRangeOrOldDelta, source) {
      if (eventType === Quill.events.SELECTION_CHANGE) {
        this.handleSelectionChange(rangeOrDelta, oldRangeOrOldDelta, source);
      }

      if (eventType === Quill.events.TEXT_CHANGE) {
        this.handleTextChange(rangeOrDelta, oldRangeOrOldDelta, source);
      }
    }.bind(this);
github NSFI / ppfish-components / source / components / RichEditor / src / quill / mixin.js View on Github external
this.handleEditorChange = function(eventType, rangeOrDelta, oldRangeOrOldDelta, source) {
			if (eventType === Quill.events.SELECTION_CHANGE) {
				this.handleSelectionChange(rangeOrDelta, oldRangeOrOldDelta, source);
			}

			if (eventType === Quill.events.TEXT_CHANGE) {
				this.handleTextChange(rangeOrDelta, oldRangeOrOldDelta, source);
			}
		}.bind(this);
github austintoddj / canvas / resources / js / components / editor / QuillEditor.vue View on Github external
initSideControls() {
            let Block = Quill.import('blots/block');

            this.editor.on(Quill.events.EDITOR_CHANGE, (eventType, range) => {
                let sidebarControls = this.$refs.sidebarControls;

                if (eventType !== Quill.events.SELECTION_CHANGE) {
                    return;
                }

                if (range == null) {
                    return;
                }

                if (range.length === 0) {
                    let [block] = this.editor.scroll.descendant(Block, range.index);

                    if (block != null && block.domNode.firstChild instanceof HTMLBRElement) {
                        let lineBounds = this.editor.getBounds(range);
                        sidebarControls.classList.remove('active');
github zenoamaro / react-quill / src / mixin.js View on Github external
editor.on('editor-change', function(eventType, rangeOrDelta, oldRangeOrOldDelta, source) {
			if (eventType === Quill.events.SELECTION_CHANGE) {
				this.handleSelectionChange(rangeOrDelta, oldRangeOrOldDelta, source);
			}
			
			if (eventType === Quill.events.TEXT_CHANGE) {
				this.handleTextChange(rangeOrDelta, oldRangeOrOldDelta, source);
			}
		}.bind(this));
	},