singerdmx / flutter-quill

Rich text editor for Flutter
https://pub.dev/packages/flutter_quill
MIT License
2.6k stars 840 forks source link

Reference image without image picker but by path #2309

Open Sesa1988 opened 1 month ago

Sesa1988 commented 1 month ago

Is there an existing issue for this?

Use case

Hi,

My users can pick files and images via other ways and I display them outside the editor. I want to insert only these images that are already "picked" and processed by a local file path (App Directory) without an image picker.

Is it possible to write a custom action to do that or is it supported but I didnt see it? I did not find any way to do it.

Proposal

An action to add a image not from an image picker but from a local path.

EchoEllet commented 1 month ago

Do you want to ensure that users can't copy images from other apps and paste them into your app? Or customize something? How is it being handled or only allow inserting local images?

Sesa1988 commented 1 month ago

Do you want to ensure that users can't copy images from other apps and paste them into your app? Or customize something? How is it being handled or only allow inserting local images?

Yes, I want to prevent everything like picking an image from the gallery, copy paste etc.

It should only be possible to reference an image that is already in the Application Directory what comes from other flows outside the editor.

I know the paths to these images and it would be nice if there would be an action to add an image that just expects an local path.

Sesa1988 commented 23 hours ago

I think we can close this issue. I implemented it via custom builders and it was pretty straight forward.