• oivind

    (@oivind)


    Hi

    Im trying pretty hard to find a way to remove image caption and dimensions field in the modal window that pops up when I click “insert image”.

    According to tinymce docs this should work, if I have understood it correctly:

    tinymce.init({
    selector: “textarea”, // change this value according to your HTML
    plugins: “image”,
    menubar: “insert”,
    toolbar: “image”,
    image_dimensions: false,
    image_description: false
    });

    I placed the above inside a jquery on load function. But it does not affect anything.
    This is maybe overridden with image-upload-for-bbpress ?
    I looked at the js for the plugin but got not much wiser.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi there,
    I don’t think this is overridden in our plugin, but I would think that TinyMCE parameters are set by bbPress or WordPress when the visual editor is initialized (i.e. there would be a call to tinymce.init() in WordPress or bbPress code that initializes the visual editor in forum topic and reply forms and that’s where the parameters for TinyMCE would be specified).

    You can probably hide the Insert Image dialog fields you don’t want via CSS, and there may be a way to do so with Javascript as well (for example, by destroying the TinyMCE instance created by WordPress/bbPress and re-initializing it using your own parameters, or by using a different plugin that allows you to set TinyMCE options). Also, the Pro version of our plugin provides a drag-and-drop image upload dialog that doesn’t include the caption or dimensions fields: https://potentplugins.com/downloads/image-upload-for-bbpress-pro-wordpress-plugin/

    Thread Starter oivind

    (@oivind)

    Thanks,that cleared some parts for me!
    Though it could seem as we have faced the same problem.
    I saw the changelog:
    = 1.0.5 =
    * Hide image caption field

    That fix do not adjust the modal height to fit, so there’s a gap where the caption field was.

    Maybe you did not bother the extra space, I can understand that, but for me, removing 3 fields and not readjust height afterwards is unfortunately not an option.

    Thanks for the plugin!

    Yes, the dialog height might not be adjusted if hiding the fields via CSS. I don’t have a demo open at the moment but I imagine positioning and sizing of that dialog is done via Javascript so it might be difficult to adjust the size via CSS. That dialog is part of the visual editor in WordPress, not part of our plugin. Again, if you’re looking for a cleaner solution without the additional fields, I would suggest our Pro plugin linked above.

    I’m having a horrible time trying to remove these fields. Not sure what’s going wrong with my css. Is there any plan to attach classes or other ways to target them specifically?

    Hi there,
    The image upload dialog is actually part of the editor included in WordPress, not part of our plugin. We do make a premium version of this plugin which includes a responsive drag-and-drop image dialog that may suit your needs better than the default WordPress editor dialog: https://potentplugins.com/downloads/image-upload-for-bbpress-pro-wordpress-plugin/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove Tinymce fields in modal’ is closed to new replies.