How to use the quill.debug 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 NSFI / ppfish-components / source / components / RichEditor / src / quill / mixin.js View on Github external
'use strict';

let Quill = require('quill');

// 只在console展示错误级别的信息
Quill.debug('error');

function formatOutputHTML(value) {
  if (!value) return value;

  // 移除HTML标签上的contenteditable属性
  return value.replace(/(<[^&<>]+)(contenteditable\s*=\s*['"]\w*['"])([^&<>]*>)/gi, '$1$3');
}

let QuillMixin = {
  /**
  Creates an editor on the given element. The editor will
  be passed the configuration, have its events bound,
  */
  createEditor: function($el, config) {
    let editor = new Quill($el, config), _this = this;
github NSFI / ppfish-components / lib / components / RichEditor / src / quill / mixin.js View on Github external
'use strict';

function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }

function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }

function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }

var Quill = require('quill'); // 只在console展示错误级别的信息


Quill.debug('error');

function formatOutputHTML(value) {
  if (!value) return value; // 移除contenteditable属性

  return value.replace(/contenteditable\s*=\s*['"]\w*['"]/gi, '');
}

var QuillMixin = {
  /**
  Creates an editor on the given element. The editor will
  be passed the configuration, have its events bound,
  */
  createEditor: function createEditor($el, config) {
    var editor = new Quill($el, config),
        _this = this; // 添加与 unprivilegedEditor 相同的方法
github ThemeFuse / Brizy / public / editor-src / editor / js / editorComponents / RichText / utils / quill.js View on Github external
import Quill from "quill";
import Link from "./formats/Link";
import BlockColor from "./formats/BlockColor";
import BlockOpacity from "./formats/BlockOpacity";
import CustomListItem from "./formats/CustomListItem";
import Population from "./formats/Population";
import Pre from "./formats/Pre";
import DCBlock from "./formats/DCBlock";
import BackgroundImage from "./formats/BackgroundImage";
import BackgroundGradient from "./formats/BackgroundGradient";

if (IS_EDITOR) {
  let Parchment = Quill.import("parchment");
  Quill.debug("error");

  const registerParchment = (
    id,
    type,
    attributorType = "class",
    scopeType = "block"
  ) => {
    const scope = {
      scope:
        scopeType === "inline" ? Parchment.Scope.INLINE : Parchment.Scope.BLOCK
    };

    let parchment;
    switch (attributorType) {
      case "class":
        parchment = new Parchment.Attributor.Class(id, type, scope);
github area17 / twill / frontend / js / libs / Quill / QuillConfiguration.js View on Github external
import Quill from 'quill'

Quill.debug('error')

const Delta = Quill.import('delta')
const Break = Quill.import('blots/break')
const Embed = Quill.import('blots/embed')
const Inline = Quill.import('blots/inline')
const Link = Quill.import('formats/link')

/*
* Support for shift enter
* @see https://github.com/quilljs/quill/issues/252
* @see https://codepen.io/mackermedia/pen/gmNwZP
*/
const lineBreak = {
  blotName: 'break',
  tagName: 'BR'
}