Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/src/editor/embed/embed_editor_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ abstract class EmbedBuilder {
String get key;
bool get expanded => true;

WidgetSpan buildWidgetSpan(Widget widget) {
WidgetSpan buildWidgetSpan(Widget widget, EmbedContext embedContext) {
Copy link
Collaborator

@EchoEllet EchoEllet Jul 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change. Clients need to update their code to build.

return WidgetSpan(child: widget);
}

Expand Down
17 changes: 9 additions & 8 deletions lib/src/editor/widgets/text/text_line.dart
Original file line number Diff line number Diff line change
Expand Up @@ -233,19 +233,20 @@ class _TextLineState extends State<TextLine> {
}

final embedBuilder = widget.embedBuilder(child);
final embedContext = EmbedContext(
controller: widget.controller,
node: child,
readOnly: widget.readOnly,
inline: true,
textStyle: lineStyle,
);
final embedWidget = EmbedProxy(
embedBuilder.build(
context,
EmbedContext(
controller: widget.controller,
node: child,
readOnly: widget.readOnly,
inline: true,
textStyle: lineStyle,
),
embedContext,
),
);
final embed = embedBuilder.buildWidgetSpan(embedWidget);
final embed = embedBuilder.buildWidgetSpan(embedWidget, embedContext);
textSpanChildren.add(embed);
continue;
}
Expand Down
Loading