Jump to content
owzim

How to disable the image button

Recommended Posts

Hi,

I tried to disable it in my site/modules/InputfieldCKEditor/config-body.js

CKEDITOR.editorConfig = function( config ) {
    config.plugins.image = 0;
    config.plugins.pwimage = 0;
    console.log('CKEDITOR.editorConfig executed');
};

I made sure that the function is executed by that console.log call, but the image button is still there.

Screen Shot 2016-12-17 at 16.29.12.png

Thanks!

 

Edit:

Removing the plugin like suggested here, doesn't do it either:

CKEDITOR.editorConfig = function( config ) {
    config.removePlugins = 'image,pwimage';
    // OR: config.removePlugins = 'pwimage';
    // OR: config.removePlugins = 'image';
};

Share this post


Link to post
Share on other sites

How about disable it in the settings for the field? Uncheck PWimage or remove it from the toolbar?

  • Like 2

Share this post


Link to post
Share on other sites

Yeah, well ... :)

Thanks @Klenkes! That did it, wasn't aware of that. Sometimes I chose the complicated route over trying  more obvious options.

Those RTEs are dinosaurs anyway, my next PW installation will have Repeater Matrix and Ace-Fields only. :)

  • Like 1

Share this post


Link to post
Share on other sites

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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By fruid
      I doubt nobody has seen this issue before…
      when I have an <h2> or <h3> or the likes in a CKEditor-body-field and I delete that header, the h-tag is applied to whatever comes next in line. I'm obviously talking about the WYSIWYG-view. Similar bugs occur when applying an h-tag, that tag sometimes encloses the next line as well. Could be that this happens when the next line is in the same "block"-element and not technically a new line but separated with a <br> but not always…
      When will a new version of CKEditor for PW be released or what's a competitive alternative at this point?
    • By Liam88
      Hello all,
      I'm having a moment with CKeditor and hoping someone will be able to assist.
      I want to change the structure of the table plugin to automatically add the following:
      Schema.org markup to signify it's a table. Aria-label and roles for each of the table elements. At the moment if I add them in manually, the plugin removes them. I'd like to have this as default.  Here is an example: Additional classes. The plugin has the option for a table ID, but where possible I'd rather use classes. I have searched far and wide on the ol Google but struggling on this. I'm not the most experienced and would appreciate any direction on this.
      It's mainly a case of where best to make said adjustments. 
      Thank you in advance!
      Liam
       
    • By Jennifer Stock
      Hi. Sometimes when I select text in a textarea field outfitted with CK Editor, it fails to register as a "Block Style" and therefore the custom styles I have specified for block-level elements are not displayed in the Styles drop-down menu. If I open the page in an incognito window and select the same elements, the Block Style styles appear as expected in the Styles menu.
      Is this a caching issue of some kind? I've played with turning on and off the HTML "quality assurance" options as well as putting my custom styles directly within the CKEditor folder in the /wire directory. Once the field stops registering the selection of block-level elements, it also seems to have simultaneously stripped the custom styles that had been successfully applied to these block-level elements previously.
      Not sure what to do next.
    • By Peter Knight
      Hi all
      My .htaccess file is correctly redirecting all requests to
      https:// www. That's great until I want to work locally.
      I thought I had seen a blog post by Ryan where there was a new config setting to ignore both of these if working from localhost?
      I can't find it now so wondering if I was imagining 😕
       
       
    • By prestoav
      Hi all and thanks for the great work on PW!

      One thing I find I have to do on any new site is add the Justify plugin to textarea fields as it is such a widely required feature for text headings in content.

      ANy chance this could be added to the core an automatically be installed on new textarea fields using CKEditor?

      Thank you!
×
×
  • Create New...