From 2bafa855aed00a36ba350e08d40c1417265e3904 Mon Sep 17 00:00:00 2001 From: Jason Chen Date: Tue, 20 Jun 2017 17:45:13 -0700 Subject: [PATCH] clear previous input, closes #1502 --- docs/docs/modules.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/docs/modules.md b/docs/docs/modules.md index fe1e7887c5..404425d799 100644 --- a/docs/docs/modules.md +++ b/docs/docs/modules.md @@ -39,7 +39,9 @@ class PlainClipboard extends Clipboard { if (typeof html === 'string') { this.container.innerHTML = html; } - return new Delta().insert(this.container.innerText); + let text = this.container.innerText; + this.container.innerHTML = ''; + return new Delta().insert(text); } }