4

I am adding items in context menu. When too many items get added it comes on ckeditor. So i want to have scroll bar for context menu.

editor.addMenuItem(suggestionBoxItem,
                                        {
                                            id: Id,
                                            label: menuLabel,
                                            group: 'suggestionBoxGroup',
                                            icon: null,
                                            onClick: function () {
                                                editor.setData('');
                                                editor.insertHtml(this.labelText);
                                            },
                                        });
Hemant Malpote
  • 891
  • 13
  • 28

1 Answers1

0

You have to customize ckeditor CSS. In your ckeditor/skins/SKIN_NAME folder you have to find following properties in corresponding *.css file (in my case it was editor.css and override them.

.cke_panel {
    height: YOUR_DEFAULT_HEIGHT;
    max-height: MAX_HEIGHT;
}

.cke_menu_panel {
    overflow-y: auto;
}

Where height is your default height when context menu is loading and no overflow is present. And max height is when scrolling in context menu is enabled.

carpenter
  • 251
  • 2
  • 11