Search code examples
javascriptckeditor4.x

How to get rid of "Source" label aside the Source button of CKeditor?


I would like to keep this button in the toolbar, keep its actions unchanged, keep the tooltip appear, but limit the label property to the tooltip only.

Inside the a.ui.addButton("Source"... of CKEDITOR.plugins.add("sourcearea",... in the ckeditor.js, the label option is defined like in the the other plugins that receive no permanent label on the toolbar. Tried

a.ui.addButton("Source", {
                        label: "",
                        command: "source",
                        toolbar: "mode,10"
                    });

which doesn't satisfy me 100%, as the tooltip is also removed.

CKEditor 4.x


Solution

  • I fixed this issue just by styling, maybe this could help you, if you still didn't figured out how this could be done

    span.cke_button__source_label {
      display: none;
    }