Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] tinyMCE - unwanted CMS Content dropdown button #21711

Closed
schnuti opened this issue Aug 19, 2018 · 3 comments
Closed

[4.0] tinyMCE - unwanted CMS Content dropdown button #21711

schnuti opened this issue Aug 19, 2018 · 3 comments

Comments

@schnuti
Copy link
Contributor

schnuti commented Aug 19, 2018

Steps to reproduce the issue

If you have a form with a "custom" editor field you see it.
Otherwise edit the article form in administrator/components/com_content/forms/article.xml

  • Change buttons="true" to buttons="false" for field-name articletext
  • Open New Article
  • The CMS Content dropdown button is there with an empty dropdown list.

tiny_mce_cms_button
Example:

      <field
         name="descripton" 
         type="editor" 
         ==>    buttons="false" 
         filter="JComponentHelper::filterText"
         height="200" 
         label="COM_MYCOMP_FIELD_DESCRIPPTION_LABEL"/>

Expected result

No button

Actual result

Button!

Comment

The height set in the form field above is of no use as it is overridden by a system wide parameter set in the tinyMCE plugin. That behaviour should be removed! I have to use a system plugin to change to the expected height.

@brianteeman
Copy link
Contributor

This a js issue in build\media_src\editors\tinymce\js\tinymce.es6.js

The button is always created even if you don't have any buttons enabled. Sorry but I have no idea how to fix that in js

@dgrammatiko
Copy link
Contributor

@brianteeman this should fix it:

      if (buttonValues.length) {
        options.setup = (editor) => {
          editor.addButton('jxtdbuttons', {
            type: 'menubutton',
            text: Joomla.JText._('PLG_TINY_CORE_BUTTONS'),
            icon: 'none icon-joomla',
            menu: buttonValues,
          });
        };
      }

Line 85 onwards

brianteeman added a commit to brianteeman/joomla-cms that referenced this issue Aug 19, 2018
@brianteeman
Copy link
Contributor

Closed see #21725

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants