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.

36 lines (35 loc) 1.19 kB
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 { CollaborativeEditor } from "./collaborative-editing.es.js"; class CollaborationModule { constructor(quill, options) { __publicField(this, "collaborativeEditor"); this.quill = quill; this.options = options; this.collaborativeEditor = new CollaborativeEditor(quill, options); window.addEventListener( "beforeunload", () => { void this.collaborativeEditor.destroy().catch((err) => console.warn("[yjs] destroy failed:", err)); }, { once: true } ); } getCursors() { return this.collaborativeEditor.getCursors(); } getAwareness() { return this.collaborativeEditor.getAwareness(); } getProvider() { return this.collaborativeEditor.getProvider(); } async destroy() { await this.collaborativeEditor.destroy(); } } export { CollaborationModule }; //# sourceMappingURL=module.es.js.map