How to set default custom ratio for image crop while open image editor
Hey @artf , I guess i found something helpful for another users. I debug the code from https://github.com/artf/grapesjs-tui-image-editor git repo and i guess i can achieve all the above functionality and many more customize functionalities like Tui image editor(This is the main library which is use into grapejs-tui-im...
Read full answer below βQuestion
Hey @artf , Thanks for creating such a helpful open source library. @artf i am working on open image editor while user change photo from Select Image modal. I got success to open image editor while user close select image modal, with the help of this code. But when this modal will open i want to set custom crop ratio in editor by default, and that default cropper ratio user can't change also user can't use other image editor other options like flip, mask, text, draw, filter and etc. Only default cropper ratio and redo, undo and reset options can be enable other options need to be hide or disa...
Answers (3)
Hey @artf , I guess i found something helpful for another users. I debug the code from https://github.com/artf/grapesjs-tui-image-editor git repo and i guess i can achieve all the above functionality and many more customize functionalities like Tui image editor(This is the main library which is use...
As you can see here https://github.com/artf/grapesjs-tui-image-editor#options
there is a config option available for the plugin which will be called on every initialization by this.getEditorConfig() so just place your options there
@artf, I already tried man, but seems not working. In this.getEditorConfig() function we are not getting updated options. I also try with log to print updated config in after this line const config = { ...opts.config };, but seems config prints initial configuration object(When i initialize editor...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1748
How to prevent drag items inside the editor
Hello @artf You are doing great job with grapesjs and it's extremely helpful to make our functionality more user friendly. Thanks for creat...
Issue #1399
Change the trait view
Hi Artf, Thanks for your great work i really wonder for your work. I have small doubt in trait management i would like to open modal instea...
Issue #3415
Custom Asset Manager. How to set bg image
Hi there! I'm building a custom modal for the Asset Manager and basically, it seems that I need to override command. How I can understand i...
Issue #1719
Event while click on image from asset modal
Hello @artf , Hope you are doing well. I am working on asset-manager. I have total 5 images as a default asset-manager image. I want to do...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins βPremium plugins ship with support, regular updates, and production-ready features β save days of integration work.
Browse premium plugins βRelated tutorials
In-depth guides on the same topic.
Tutorial
Vanilla GrapesJS vs GrapesJS With Plugins: What You Actually Get Out of the Box (2026)
New to GrapesJS? See exactly what the stock editor gives you, where it falls short, and which plugins close the gaps β a beginner-friendly 2026 comparison
Tutorial
Lighthouse for GrapesJS: Audit Accessibility and SEO Without Leaving the Editor
Live WCAG 2.1/2.2 accessibility auditor + SEO manager for GrapesJS. Every finding is bound to the exact component β click to select, then one-click fix.
Tutorial
GrapesJS DevTools: A Developer Panel Inside Your Editor
If you've ever debugged GrapesJS with console.log(editor.getSelected()) and a dozen throwaway event listeners β this post is for you.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.