Issue #1809Opened February 19, 2019by sakshigarg91 reactions

Customize image resizing

Question

If i want to limit resizing an image to only specific dimensions, how can i do that? Also is it possible to enable resizing only from the bottom right corner and disable from the other corners and points?

Answers (3)

artfMarch 3, 20191 reactions

How can I update these properties if I'm using the grapesjs-preset-webpage?

You can always update a component type (but do it as a plugin)

editor.DomComponents.addType('image', {
	model: {
		defaults: {
			resizable: {
				  tl: 0, // Top left
                  tc: 0, // Top center
                  tr: 0, // Top right
                  cl: 0, // Center left
                  bl: 0, // Bottom left
			}
		}
	}
})
artfFebruary 22, 20190 reactions

You can use this options for the resizable property of components

sakshigarg9February 26, 20190 reactions

How can I update these properties if I'm using the grapesjs-preset-webpage?

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.