From fd9ccf78f4897f349d57d081420debb5c144a118 Mon Sep 17 00:00:00 2001 From: Sumit Kumar Maitra Date: Fri, 9 Sep 2016 23:22:00 +0100 Subject: [PATCH] Updated pasteHTML(...) interface definitions and bumped version to v1.0.3 --- quill/quill-tests.ts | 12 ++++++++++++ quill/quill.d.ts | 5 +++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/quill/quill-tests.ts b/quill/quill-tests.ts index 5116ace5256ca5..172b5fd4615152 100644 --- a/quill/quill-tests.ts +++ b/quill/quill-tests.ts @@ -172,3 +172,15 @@ function test_on_EventType1(){ }); } + +function test_PasteHTML() +{ + var quillEditor = new Quill('#editor'); + quillEditor.pasteHTML('

Quill Rocks

'); +} + +function test_PasteHTML2() +{ + var quillEditor = new Quill('#editor'); + quillEditor.pasteHTML(5, '

Quill Rocks

'); +} diff --git a/quill/quill.d.ts b/quill/quill.d.ts index 885f6bdc34ab77..2e75e14c2019fc 100644 --- a/quill/quill.d.ts +++ b/quill/quill.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Quill v1.0.0 +// Type definitions for Quill v1.0.3 // Project: http://quilljs.com // Definitions by: Sumit // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -49,7 +49,8 @@ declare namespace QuillJS { insertText(index: number, text: string, source?: sourceType): void; insertText(index: number, text: string, format: string, value: string, source?: sourceType): void; insertText(index: number, text: string, formats: formatsType, source?: sourceType): void; - pasteHTML(): string; + pasteHTML(index: number, html: string, source?:sourceType): string; + pasteHTML(html:string, source?: sourceType): string; setContents(delta: DeltaStatic, source?: sourceType): void; setText(text: string, source?: sourceType): void; update(source?: string): void;