mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
Merge pull request #892 from LucasXu0/feat/link
[FR] Implement link feature in AppFlowyEditor #886
This commit is contained in:
@ -56,7 +56,7 @@ extension TextNodeExtension on TextNode {
|
|||||||
bool allSatisfyInSelection(
|
bool allSatisfyInSelection(
|
||||||
String styleKey,
|
String styleKey,
|
||||||
Selection selection,
|
Selection selection,
|
||||||
bool Function(dynamic value) compare,
|
bool Function(dynamic value) test,
|
||||||
) {
|
) {
|
||||||
final ops = delta.whereType<TextInsert>();
|
final ops = delta.whereType<TextInsert>();
|
||||||
final startOffset =
|
final startOffset =
|
||||||
@ -72,7 +72,7 @@ extension TextNodeExtension on TextNode {
|
|||||||
if (start < endOffset && start + length > startOffset) {
|
if (start < endOffset && start + length > startOffset) {
|
||||||
if (op.attributes == null ||
|
if (op.attributes == null ||
|
||||||
!op.attributes!.containsKey(styleKey) ||
|
!op.attributes!.containsKey(styleKey) ||
|
||||||
!compare(op.attributes![styleKey])) {
|
!test(op.attributes![styleKey])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user