From 61c129ce0453d2e7b9a7c2852fb859bc1dbf4a36 Mon Sep 17 00:00:00 2001 From: AtlasAutocode <165201146+AtlasAutocode@users.noreply.github.com> Date: Thu, 23 May 2024 10:13:17 -0600 Subject: [PATCH] Fix: Issue 1887 (#1892) * Value setting Stateful toolbar buttons derive from base class * Rename base class as QuillToolbarBaseValueButton * Removed deprecated functions * Move clipboard actions to QuillController * Fix: collectAllIndividualStylesAndEmbed for result span * Add: Clipboard toolbar buttons * Add: test for QuillController clipboard Dart Formatted * Fix Issue 1887 --------- Co-authored-by: Douglas Ward --- lib/src/models/rules/insert.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/models/rules/insert.dart b/lib/src/models/rules/insert.dart index 5a53fbdf..b97058bc 100644 --- a/lib/src/models/rules/insert.dart +++ b/lib/src/models/rules/insert.dart @@ -565,8 +565,8 @@ class PreserveInlineStylesRule extends InsertRule { if ((prev.data as String).endsWith('\n')) { if (prev.attributes != null) { - for (final value in prev.attributes!.values) { - if (!(value as Attribute).isInline) { + for (final key in prev.attributes!.keys) { + if (!Attribute.inlineKeys.contains(key)) { return null; } }