Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
tsdevelopment Posted October 26, 2018 Posted October 26, 2018 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)); });
Joel R Posted October 26, 2018 Posted October 26, 2018 You can customize the editor in the ACP to add / edit buttons. You can also customize the editor for different display sizes.
tsdevelopment Posted October 27, 2018 Author Posted October 27, 2018 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.
tsdevelopment Posted October 27, 2018 Author Posted October 27, 2018 Okay, I solved it with a hook. That's the perfect solution in my case.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.