From 82322b5fa6104bcc97235e470bbf6a2cd26bde00 Mon Sep 17 00:00:00 2001 From: Ellet Date: Thu, 13 Jun 2024 16:29:19 +0300 Subject: [PATCH] chore: update clipboardPaste function to improve usages of _pasteHTML and _pasteMarkdown --- lib/src/widgets/quill/quill_controller.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/src/widgets/quill/quill_controller.dart b/lib/src/widgets/quill/quill_controller.dart index cc77b23c..012f1a25 100644 --- a/lib/src/widgets/quill/quill_controller.dart +++ b/lib/src/widgets/quill/quill_controller.dart @@ -507,12 +507,14 @@ class QuillController extends ChangeNotifier { Future clipboardPaste({void Function()? updateEditor}) async { if (readOnly || !selection.isValid) return true; - if (await _pasteHTML()) { + final pasteUsingHtmlSuccess = await _pasteHTML(); + if (pasteUsingHtmlSuccess) { updateEditor?.call(); return true; } - if (await _pasteMarkdown()) { + final pasteUsingMarkdownSuccess = await _pasteMarkdown(); + if (pasteUsingMarkdownSuccess) { updateEditor?.call(); return true; }