fresh_quill_extensions 0.0.1 fresh_quill_extensions: ^0.0.1 copied to clipboard
Embed extensions for flutter_quill including image, video, formula and etc.
Flutter Quill Extensions #
A extensions for flutter_quill to support embed widgets like image, formula, video and more.
Currently the support for Web is limitied.
Check Flutter Quill for details of use.
Installation #
Before start using this package, please make sure to install flutter_quill_extensions package first and follow it's usage instructions.
dependencies:
fresh_quill_extensions: ^<latest-version-here>
OR
dependencies:
fresh_quill_extensions:
git: https://github.com/freshtechtips/fresh-quill-extensions.git
Platform spesefic configurations #
We are using
gal
plugin to save images. For this to work, you need to add the appropriate permissions to yourInfo.plist
andAndroidManifest.xml
files. See https://github.com/natsuk4ze/gal#-get-started to add the needed lines.We also use
image_picker
plugin for picking images so please make sure follow the instructionsFor loading the image from the internet we need internet permission
- For Android, you need to add some permissions in
AndroidManifest.xml
, Please follow this link for more info, the internet permission included by default only for debugging so you need to follow this link to add it in the release version too. you should allow loading images and videos only for thehttps
protocol but if you want http too then you need to configure your android application to accepthttp
in the release mode, follow this link for more info.- for macOS you also need to include a key in your
Info.plist
, please follow this link to add the required configurationsThe extensions package also use image_picker which also require some configurations, follow this link. It's needed for Android, iOS, macOS, we must inform you that you can't pick photo using camera in desktop so make sure to handle that if you plan on add support for desktop, this might changed in the future and for more info follow this link
Usage #
Before starting using this package you must follow the setup
Set the embedBuilders
and embedToolbar
params in configurations of QuillEditor
and QuillToolbar
with the
values provided by this repository.
QuillToolbar(
configurations: QuillToolbarConfigurations(
embedButtons: FlutterQuillEmbeds.toolbarButtons(
imageButtonOptions: QuillToolbarImageButtonOptions(
onImagePickCallback: (file) async {
return file.path;
},
),
),
),
),
Expanded(
child: QuillEditor.basic(
configurations: QuillEditorConfigurations(
readOnly: true,
embedBuilders: FlutterQuillEmbeds.editorBuilders(
imageEmbedConfigurations:
const QuillEditorImageEmbedConfigurations(
forceUseMobileOptionMenuForImageClick: true,
),
),
),
),
)