scaleflex / filerobot-image-editor

Edit, resize, and filter any image! Any questions or issues, please report to https://github.com/scaleflex/filerobot-image-editor/issues
MIT License
1.27k stars 322 forks source link

How To Set Default Filter & Default Effect Option Selected In Filerobot Image Editor Config In JS #385

Closed YashpalModi closed 1 month ago

YashpalModi commented 9 months ago

Hey there,I am using Filerobot-Image-Editor For First Time ,Now My Question Is:How To Set Default Filter & Default Effect Option Selected In Filerobot Image Editor Config In JS?Please Provide Me Solution Suitable. Screenshot from 2023-09-13 09-42-18

AhmeeedMostafa commented 9 months ago

@YashpalModi you couldn't provide a filter, just u could provide defaultTabId with filters tab id, in that case the filters tab would be opened as default but without providing custom filter

YashpalModi commented 9 months ago

Thanks For Your Reply,But As I can See there are many filter options available like Love,Old Boot,Pin Hole,Orange Peel etc I want One Of them selected As Default When Editor Opens each time.How To do That With Js?

AhmeeedMostafa commented 9 months ago

Yes As I have mentioned it is not possible to select a default filter

YashpalModi commented 9 months ago

How can i check that user has not selected any filter option after selecting filter button and click on apply i want alert that please select at least on filter option otherwise disable apply button .How can i achieve it with js?

AhmeeedMostafa commented 9 months ago

please check these functions onModify & getCurrentImgDataFnRef u could use any of them to recognize the changes and check if they have filter or not.

YashpalModi commented 9 months ago

How can i check if any of filter option's class is applied or not on click Of Apply Button in Filerobot Image Editor In Js Code? Any Solution Please without using any function....

AhmeeedMostafa commented 1 month ago

@YashpalModi