Update comment for EnsureEmbedLineRule And update changelog.

pull/1309/head
hehong 2 years ago
parent bf18d92190
commit 995908ab54
  1. 6
      CHANGELOG.md
  2. 6
      lib/src/models/rules/delete.dart
  3. 2
      pubspec.yaml

@ -1,3 +1,9 @@
# [7.2.13]
- Fix around image can't delete line break.
# [7.2.12]
- Add support for copy/cut select image and text together.
# [7.2.12] # [7.2.12]
- Add support for copy/cut select image and text together. - Add support for copy/cut select image and text together.

@ -109,7 +109,10 @@ class PreserveLineStyleOnMergeRule extends DeleteRule {
} }
} }
/// Prevents user from merging a line containing an embed with other lines. /// This rule applies to video, not image
///
/// Prevents user from merging a line containing an video embed with other
/// lines, Corresponds [InsertEmbedsRule].
class EnsureEmbedLineRule extends DeleteRule { class EnsureEmbedLineRule extends DeleteRule {
const EnsureEmbedLineRule(); const EnsureEmbedLineRule();
@ -121,6 +124,7 @@ class EnsureEmbedLineRule extends DeleteRule {
var op = itr.skip(index); var op = itr.skip(index);
final opAfter = itr.skip(index + 1); final opAfter = itr.skip(index + 1);
//Only video embed need can't merging a line.
if (!_isVideo(op) || !_isVideo(opAfter)) { if (!_isVideo(op) || !_isVideo(opAfter)) {
return null; return null;
} }

@ -1,6 +1,6 @@
name: flutter_quill name: flutter_quill
description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us) description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us)
version: 7.2.12 version: 7.2.13
#author: bulletjournal #author: bulletjournal
homepage: https://bulletjournal.us/home/index.html homepage: https://bulletjournal.us/home/index.html
repository: https://github.com/singerdmx/flutter-quill repository: https://github.com/singerdmx/flutter-quill

Loading…
Cancel
Save