Jump to content

Customize CKEDITOR toolbars


tsdevelopment

Recommended Posts

Posted

Is there any possibility to customize the CKEDITOR toolbar? I only want to display the emoticon button. If I reinitialize the editor after it is ready and resize the window the old toolbar will be shown. I tried to delete the old editor, replace it, and so much more. But none of my solutions works properly.

Currently I try to override the replace function. But the following code give me a duplicate editor. Is the a working solution?

CKEDITOR.replace = function (node, conf) {
	conf.enterMode = CKEDITOR.ENTER_BR;
	conf.height = 50;
	conf.toolbar = [{
		name: 'row1',
		items: ['ipsEmoticon'],
	}];

	return oldReplace(node, conf);
};

CKEDITOR.once('instanceReady', function(event) {
	var editor = event.editor;
	var name = editor.name;

	// Modify editor
	var conf = editor.config;

	conf.enterMode = CKEDITOR.ENTER_BR;
	conf.height = 50;
	conf.toolbar = [{
		name: 'row1',
		items: ['ipsEmoticon'],
	}];

	editor.destroy();

	this.editorInstance = CKEDITOR.replace(name, conf);
	this.editorInstance.on('key', this.onKeyDown.bind(this));
});

 

Posted
9 hours ago, Joel R said:

You can customize the editor in the ACP to add / edit buttons.  

You can also customize the editor for different display sizes.  

I know that. But then I change all editors. I only want to change one specific editor.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...