fix wrong custom embed key (#962)

pull/963/head
Thea Choem 3 years ago committed by GitHub
parent b10f15f07e
commit f314dbf052
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      lib/src/widgets/editor.dart

@ -485,14 +485,15 @@ class QuillEditorState extends State<QuillEditor>
if (builders != null) {
var _node = node;
final type = node.value.type;
// Creates correct node for custom embed
if (node.value.type == BlockEmbed.customType) {
if (type == BlockEmbed.customType) {
_node = Embed(CustomBlockEmbed.fromJsonString(node.value.data));
}
for (final builder in builders) {
if (builder.key == _node.value.type) {
if (builder.key == type) {
return builder.build(context, controller, _node, readOnly);
}
}

Loading…
Cancel
Save