Tried this for now, but no luck
editor.addCss(this.path + 'tabber.css'); editor.document.appendStyleSheet(this.path + 'tabber.css');
Full code
(function () { CKEDITOR.plugins.add('tabber', { init: function (editor) { editor.ui.addButton('addTab', { command: 'addTab', icon: this.path + 'icons/tabber.png', label: Drupal.t('Insert tabs') }); editor.addCss(this.path + 'tabber.css'); editor.document.appendStyleSheet(this.path + 'tabber.css'); editor.addCommand('addTab', { exec: function (editor) { editor.insertHtml('<dl>' + '<dt>Tab title 1</dt>' + '<dd><p>Tab content 1.</p></dd>' + '<dt>Tab title 2</dt>' + '<dd><p>Tab content 2.</p></dd>' + '</dl>'); } }); } }); })();
Solution (thanks for the answer, indicating the correct path) inside init
var cssPath = this.path + 'tabber.css'; editor.on('instanceReady', function () { this.document.appendStyleSheet(cssPath); });
source share