Jump to content
iipa

ProcessPageEditImageSelect: Change Cropping options

Recommended Posts

Hi fellow developers!

I have a basic image field on my page. I would like to force a specific aspect ratio when user wants to crop the image. Module apparently uses crop.js for cropping features, and I found some settings related to it in ProcessPageEditImageSelect.js:

var cropSettings = {
    autoCrop: true,
    autoCropArea: 0.35,
    zoomable: false,
    rotatable: false,
    // etc ...
};

I would like to change these settings, but obviously I don't want to do so straight in module code (especially because it is in wire).

Question is: How can I refer to these settings somewhere safer? (For example I have admin.js where I already do some other stuff in admin pages located in site/templates/scripts)

Share this post


Link to post
Share on other sites

Hey @iipa – just a quick heads-up that I've moved this thread to the General Support area of the forum. Modules/Plugins area of the forum is dedicated for (third party) module support threads (of which there should be one per module), and this question is about a core module/feature 🙂

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By hdesigns
      I stumbled upon a (really small) problem while I was trying something relatively simple (as I thought):
      I was adding a resized image with CKEditor (same thing goes for TinyMCE) and checked the option to add a link to the full-sized version. So far so good. The next step for me was to make the full-sized version popping up if someone is clicking on the image (on the front-end of course). So I used fancybox to make this happen. But then I got stuck because as it looks like the anchor-tag has to have some css-class or id to indicate the fancybox-script that this image has to be fancyboxed.
      I'm pretty sure this is also possible without any id or class. But this is not my point. My point is that it should be possible to add a class to every image that was included with the ProcessPageEditImageSelect (which is used by both CKEditor and TinyMCE to insert an image).
      This module is already configurable. I suggest to add another configuration-item named somewhat link-class that would be empty by default.
      But if someone, like me, wants to add a css-class to every linked image, he/she could simply set a class name...
      What do you think about it? I know, it's a really small change, but maybe some people could benefit on that.
      I was thinking of editing the ProcessPageEditImageSelect so it behaves like I said, but I'm feeling a bit uncomfortable hacking on core modules (problems on updates and so on)... What is your opinion on that?
    • By Joe
      Hi,
      I´m using CKEditor as an inline editor on the front-end. Now I need to call the ProcessPageEditImageSelect dialog when the CKEditor image button is pressed, just like  when using the editor in the back-end. (Right now the standard CKEditor image dialog comes up.)
      Does anyone know how to integrate ProcessPageEditImageSelect here? Thank you!
×
×
  • Create New...