Problem/Motivation

Currently, with using ckeditor_templates we have the same icon as this module, but we don't have a "Template" label next to the icon. With all the buttons and gizmos on a typical CKE toolbar, I'd like the ability to not show the label as well as rename the label to keep the toolbar less cluttered and more in line with what we had in CKE4.

Proposed resolution

I think adding the option to disable the label and change the text would need to update the template.js code to use config values like:

        const dropdownView = createDropdown(locale);
        dropdownView.buttonView.set({
          label: this.editor.config.get('button_label'),
          withText: this.editor.config.get('with_textl'),
          icon: templateIcon,
          tooltip: true
        });

And then add those config values to this module's config form.

What do you think?

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

afinnarn created an issue. See original summary.

dbielke1986’s picture

Great Idea,

Will will try to implement this feature next week!

A MR is highly appreciated :-)

vincent.hoehn made their first commit to this issue’s fork.

vincent.hoehn’s picture

Thank you for your feature request! The implementation has started.

afinnarn’s picture

The changes so far look good to me with disabling the button label. Still missing the ability to rename the label text, but maybe that part is not wanted. Let me know if this needs reviewed or any help with the MR.

vincent.hoehn’s picture

Status: Active » Fixed

The implementation is complete. I have merged the issue-fork in our dev branch 1.0.x-dev. If everything works, we will publish a new release soon.

dbielke1986’s picture

Version: 1.0.2 » 1.0.x-dev
vincent.hoehn’s picture

Integrated in Release 1.0.3

naveenvalecha’s picture

@vincent.hoehn
Thanks for the great work in creating and maintaining this module.

I have just now upgraded to Latest 1.0.3 and got the following error

AssertionError: Schema errors: Array ( [editor.editor.id_does_not_matter:settings.plugins.ckeditor5_template_template.show_toolbar_text] => missing schema [editor.editor.id_does_not_matter:settings.plugins.ckeditor5_template_template.custom_toolbar_text] => missing schema ) in assert() (line 733 of core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php). 
dbielke1986’s picture

vincent.hoehn’s picture

With 1.0.4 everything should work as it is supposed to!

dbielke1986’s picture

Great

marcoka’s picture

Thank you very much for this module. Really needed to use ckeditor productive in D10.

dbielke1986’s picture

Version: 1.0.x-dev » 1.0.4

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.