UNPKG

@opentiny/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.

31 lines (30 loc) 896 B
var __defProp = Object.defineProperty; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); import Quill from "quill"; const Embed = Quill.import("blots/embed"); class SoftBreak extends Embed { constructor() { super(...arguments); __publicField(this, "remove"); } static create() { const node = super.create(); return node; } optimize() { if (this.prev === null) { this.remove(); } } length() { return 1; } } __publicField(SoftBreak, "blotName", "soft-break"); __publicField(SoftBreak, "tagName", "BR"); __publicField(SoftBreak, "className", "ql-soft-break"); export { SoftBreak }; //# sourceMappingURL=soft-break.es.js.map