@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.
30 lines (28 loc) • 1.14 kB
TypeScript
import { default as TypeClipboard } from 'quill/modules/clipboard';
import { default as FluentEditor } from '../fluent-editor';
declare const Clipboard: typeof TypeClipboard;
declare class CustomClipboard extends Clipboard {
quill: FluentEditor;
convert: any;
onCopy: any;
matchers: any;
prepareMatching(container: any, nodeMatches: any): any[][];
onCaptureCopy(e: any, isCut?: boolean): void;
onCapturePaste(e: ClipboardEvent): void;
onPaste(range: any, { html, text, files: clipboardFiles, rtf }: {
html: any;
text: any;
files: any;
rtf: any;
}): void;
files2urls(files: any, placeholders: any, originalUrls: any, pastedDelta: any, imageIndexs: any): Promise<any[]>;
flipFilesArray(filesArr: any): any[][];
convertHexToBase64(hexString: any): string;
extractImageDataFromRtf(rtfData: any): any[];
extractFilesFromDelta(delta: any, clipboardFiles: any, hexImages?: any): Promise<any[]>;
getImgSelection(delta: any, imageIndex: any): {
index: number;
length: number;
};
}
export default CustomClipboard;