Ignore base64 image in web

pull/890/head
X Code 3 years ago
parent 0866dfd512
commit 25aeeab750
  1. 5
      example/lib/universal_ui/universal_ui.dart
  2. 1
      lib/flutter_quill.dart

@ -35,8 +35,11 @@ Widget defaultEmbedBuilderWeb(
) {
switch (node.value.type) {
case BlockEmbed.imageType:
// TODO: handle imageUrl of base64
final imageUrl = node.value.data;
if (isImageBase64(imageUrl)) {
// TODO: handle imageUrl of base64
return const SizedBox();
}
final size = MediaQuery.of(context).size;
UniversalUI().platformViewRegistry.registerViewFactory(
imageUrl, (viewId) => html.ImageElement()..src = imageUrl);

@ -13,6 +13,7 @@ export 'src/utils/embeds.dart';
export 'src/widgets/controller.dart';
export 'src/widgets/default_styles.dart';
export 'src/widgets/editor.dart';
export 'src/widgets/embeds/image.dart';
export 'src/widgets/link.dart' show LinkActionPickerDelegate, LinkMenuAction;
export 'src/widgets/style_widgets/style_widgets.dart';
export 'src/widgets/toolbar.dart';

Loading…
Cancel
Save