UNPKG

@cairn214/fluent-editor

Version:

A rich text editor based on Quill 2.0, which extends rich modules and formats on the basis of Quill. It's powerful and out-of-the-box.

29 lines (28 loc) 1 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); const Quill = require("quill"); const BlockEmbed = Quill.imports["blots/block/embed"]; class CustomerWidgetLink extends BlockEmbed { static create(value) { const node = super.create(value); node.setAttribute("data-widget-type", value.type); node.setAttribute("data-widget-id", value.id); node.setAttribute("src", value.value); return node; } static value(domNode) { return { type: domNode.getAttribute("data-widget-type"), id: domNode.getAttribute("data-widget-id"), value: domNode.getAttribute("src") }; } constructor(scroll, domNode, data) { super(scroll, domNode, data); } } CustomerWidgetLink.blotName = "customer-widget-link"; CustomerWidgetLink.tagName = "img"; CustomerWidgetLink.className = "ql-customer-widget-link"; exports.default = CustomerWidgetLink; //# sourceMappingURL=customer-widget-link.cjs.js.map