Skip to content

Commit cfe51ce

Browse files
Fix: switch super_editor_quill to local super_editor and add missing interface APIs (#2149)
1 parent 7ed7d36 commit cfe51ce

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

super_editor_quill/lib/src/content/multimedia.dart

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ class VideoNode extends UrlMediaNode {
1111
super.altText = '',
1212
super.blockAttribution = videoAttribution,
1313
});
14+
15+
@override
16+
DocumentNode copy() {
17+
return VideoNode(id: id, url: url, altText: altText, blockAttribution: blockquoteAttribution);
18+
}
1419
}
1520

1621
/// [DocumentNode] that represents an audio source at a URL.
@@ -23,6 +28,11 @@ class AudioNode extends UrlMediaNode {
2328
super.altText = '',
2429
super.blockAttribution = audioAttribution,
2530
});
31+
32+
@override
33+
DocumentNode copy() {
34+
return AudioNode(id: id, url: url, altText: altText, blockAttribution: blockquoteAttribution);
35+
}
2636
}
2737

2838
/// [DocumentNode] that represents a file at a URL.
@@ -35,6 +45,11 @@ class FileNode extends UrlMediaNode {
3545
super.altText = '',
3646
super.blockAttribution = fileAttribution,
3747
});
48+
49+
@override
50+
DocumentNode copy() {
51+
return FileNode(id: id, url: url, altText: altText, blockAttribution: blockquoteAttribution);
52+
}
3853
}
3954

4055
/// [DocumentNode] that represents a media source that exists a given [url].
@@ -86,6 +101,17 @@ class UrlMediaNode extends BlockNode with ChangeNotifier {
86101
return other is UrlMediaNode && url == other.url && altText == other.altText;
87102
}
88103

104+
@override
105+
DocumentNode copy() {
106+
return UrlMediaNode(
107+
id: id,
108+
url: url,
109+
altText: altText,
110+
blockAttribution: getMetadataValue("blockType"),
111+
metadata: metadata,
112+
);
113+
}
114+
89115
@override
90116
bool operator ==(Object other) =>
91117
identical(this, other) ||

super_editor_quill/pubspec.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ dependencies:
1616
dart_quill_delta: ^9.4.1
1717
collection: ^1.18.0
1818

19-
#dependency_overrides:
20-
# super_editor:
21-
# path: ../super_editor
19+
dependency_overrides:
20+
super_editor:
21+
path: ../super_editor
22+
super_text_layout:
23+
path: ../super_text_layout
2224
# attributed_text:
2325
# path: ../attributed_text
2426

0 commit comments

Comments
 (0)