|
|
|
@ -91,7 +91,10 @@ class QuillController extends ChangeNotifier { |
|
|
|
delta.isNotEmpty && |
|
|
|
delta.isNotEmpty && |
|
|
|
delta.length <= 2 && |
|
|
|
delta.length <= 2 && |
|
|
|
delta.last.isInsert; |
|
|
|
delta.last.isInsert; |
|
|
|
if (shouldRetainDelta && toggledStyle.isNotEmpty) { |
|
|
|
if (shouldRetainDelta && |
|
|
|
|
|
|
|
toggledStyle.isNotEmpty && |
|
|
|
|
|
|
|
delta.length == 2 && |
|
|
|
|
|
|
|
delta.last.data == '\n') { |
|
|
|
// if all attributes are inline, shouldRetainDelta should be false |
|
|
|
// if all attributes are inline, shouldRetainDelta should be false |
|
|
|
final anyAttributeNotInline = |
|
|
|
final anyAttributeNotInline = |
|
|
|
toggledStyle.values.any((attr) => !attr.isInline); |
|
|
|
toggledStyle.values.any((attr) => !attr.isInline); |
|
|
|
|