Skip to content

Commit

Permalink
revert(example): using web embed builders for all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
EchoEllet authored Jan 18, 2025
1 parent 8d46514 commit acd8de4
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,24 +147,23 @@ class _HomePageState extends State<HomePage> {
placeholder: 'Start writing your notes...',
padding: const EdgeInsets.all(16),
embedBuilders: [
// ...FlutterQuillEmbeds.editorBuilders(
// imageEmbedConfig: QuillEditorImageEmbedConfig(
// imageProviderBuilder: (context, imageUrl) {
// // https://pub.dev/packages/flutter_quill_extensions#-image-assets
// if (imageUrl.startsWith('assets/')) {
// return AssetImage(imageUrl);
// }
// return null;
// },
// ),
// videoEmbedConfig: QuillEditorVideoEmbedConfig(
// customVideoBuilder: (videoUrl, readOnly) {
// // To load YouTube videos https://github.com/singerdmx/flutter-quill/releases/tag/v10.8.0
// return null;
// },
// ),
// ),
...FlutterQuillEmbeds.editorWebBuilders(),
...FlutterQuillEmbeds.editorBuilders(
imageEmbedConfig: QuillEditorImageEmbedConfig(
imageProviderBuilder: (context, imageUrl) {
// https://pub.dev/packages/flutter_quill_extensions#-image-assets
if (imageUrl.startsWith('assets/')) {
return AssetImage(imageUrl);
}
return null;
},
),
videoEmbedConfig: QuillEditorVideoEmbedConfig(
customVideoBuilder: (videoUrl, readOnly) {
// To load YouTube videos https://github.com/singerdmx/flutter-quill/releases/tag/v10.8.0
return null;
},
),
),
TimeStampEmbedBuilder(),
],
),
Expand Down

0 comments on commit acd8de4

Please sign in to comment.