Jump to content

Preset Image Crop Sizes for RTE images


Neeks
 Share

Recommended Posts

It would be awesome users could size their images for the RTE (rich text editor) using preset cropping sizes. This could really help ensure consistency across a site for editors that need to add images and reduce the amount of training needed when dealing with images. third part image crop fields do this really well, but do not offer a way to use the crops in the RTE.

Image: Look next to the cancel button, there is a pulldown for image size presets.

post-1913-0-48938200-1434723253_thumb.jp

Drop down menus allows users the ability to select some preset image cropping dimensions. Crop guides would keep the aspect ratio, and return the desired image size.

post-1913-0-53969500-1434723263_thumb.jp

Pick custom size and the cropping guides would work as they normally do (free form)

Other approaches:  ProcessPageImageSelect could be made hookable in a way that images from third party image modules can add images to the RTE image selection page.
 

i've been trying to get  a preset image crop sizes into the RTE editor for a while now. I tried to use the hooks in ProcessPageImageSelect in-combination with the CroppableImage module but there is no hooks for this as (as far as I know). 

$this->addHookAfter('ProcessPageEditImageSelect::execute', $this, 'HookPageImageSelect');

The hook above will allow me to add images to the image selection modal, but I still can't get images that image to be addable to the Rich Text Editor on click. I was able to get the desired functionality by modifying core module ProcessPageImageSelect.  Maybe if ProcessPageEditImageSelect->getImages() was hookable images from other modules could be added without modifying core modules. 

  • Like 4
Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...