[英]How to add scroll bar to context menu ckeditor
我在上下文菜單中添加項目。 當添加太多項目時,它會出現在ckeditor上。 所以我想要上下文菜單的滾動條。
editor.addMenuItem(suggestionBoxItem,
{
id: Id,
label: menuLabel,
group: 'suggestionBoxGroup',
icon: null,
onClick: function () {
editor.setData('');
editor.insertHtml(this.labelText);
},
});
你必須自定義ckeditor CSS。 在ckeditor / skins / SKIN_NAME文件夾中,您必須在相應的* .css文件中找到以下屬性(在我的情況下,它是editor.css並覆蓋它們。
.cke_panel {
height: YOUR_DEFAULT_HEIGHT;
max-height: MAX_HEIGHT;
}
.cke_menu_panel {
overflow-y: auto;
}
如果加載上下文菜單時高度是您的默認高度,並且不存在溢出。 最大高度是在啟用上下文菜單時滾動。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.