-
Notifications
You must be signed in to change notification settings - Fork 815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix around image use backspace key can't delete break line. #1309
Conversation
This PR contains previous changes |
Can you rebase? |
Is this about image or video? |
3a01165
to
a353ef1
Compare
About image. |
@@ -118,6 +119,12 @@ class EnsureEmbedLineRule extends DeleteRule { | |||
final itr = DeltaIterator(document); | |||
|
|||
var op = itr.skip(index); | |||
final opAfter = itr.skip(index + 1); | |||
|
|||
if (!_isVideo(op) || !_isVideo(opAfter)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add comment what this is about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that EnsureEmbedLineRule should be renamed to EnsureVideoLineRule?
This rule is only applicable to video?
why is it not applicable to image?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this change work with content that has video?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to exclude image, you can check:
if (_isImage(op) || _isImage(opAfter)) {
return null;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You basically want to exclude image from this rule, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add one line to class comment:
/// This rule applies to video, not image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update changelog.
The change makes sense to me now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't understand when need to update changelog, Every time pr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this change needs to be published as a new version
Fix around image use backspace key can't delete break line. issue #1306
2023-07-16.11-18-21.mp4
I think EnsureEmbedLineRule and InsertEmbedsRule both apply for embed.EnsureEmbedLineRule only work for video, but InsertEmbedsRule for all embed. Must idea control block or inline element by expend of embed.