Summernote 编辑不显示滚动条
Summernote edit not displaying scroll bars
我在 bootstrap 模态中使用 summernote 并将其设置如下:
$('.summernote').summernote({
toolbar: [
['style', ['bold', 'italic', 'underline', 'clear','fontname']],
['color', ['color']],
['fontsize', ['fontsize']],
['height', ['height']],
['style', ['style']],
['para', ['ul', 'ol', 'paragraph']],
['misc', ['fullscreen','undo','redo']],
['table', ['table']]
]
});
问题是当我在编辑区输入文本并移至编辑区底部下方时没有出现滚动条,如下所示:
需要什么才能显示滚动条并将文本限制在行内?
你可能想试试这个
.bootstrap-modal-selector {
overflow-y:scroll;
}
Documentation for Summernote 说:
height : String/Number (optional)
set editor height (e.g. 300px)
Defaults to: null
所以,解决方案是:
$('.summernote').summernote({
height: '300px',
toolbar: [
['style', ['bold', 'italic', 'underline', 'clear','fontname']],
['color', ['color']],
['fontsize', ['fontsize']],
['height', ['height']],
['style', ['style']],
['para', ['ul', 'ol', 'paragraph']],
['misc', ['fullscreen','undo','redo']],
['table', ['table']]
]
});
我在 CSS 上使用这个:
.note-editable.panel-body {
overflow-y: scroll;
}
对我有用
我在 bootstrap 模态中使用 summernote 并将其设置如下:
$('.summernote').summernote({
toolbar: [
['style', ['bold', 'italic', 'underline', 'clear','fontname']],
['color', ['color']],
['fontsize', ['fontsize']],
['height', ['height']],
['style', ['style']],
['para', ['ul', 'ol', 'paragraph']],
['misc', ['fullscreen','undo','redo']],
['table', ['table']]
]
});
问题是当我在编辑区输入文本并移至编辑区底部下方时没有出现滚动条,如下所示:
需要什么才能显示滚动条并将文本限制在行内?
你可能想试试这个
.bootstrap-modal-selector {
overflow-y:scroll;
}
Documentation for Summernote 说:
height : String/Number (optional)
set editor height (e.g. 300px)
Defaults to: null
所以,解决方案是:
$('.summernote').summernote({
height: '300px',
toolbar: [
['style', ['bold', 'italic', 'underline', 'clear','fontname']],
['color', ['color']],
['fontsize', ['fontsize']],
['height', ['height']],
['style', ['style']],
['para', ['ul', 'ol', 'paragraph']],
['misc', ['fullscreen','undo','redo']],
['table', ['table']]
]
});
我在 CSS 上使用这个:
.note-editable.panel-body {
overflow-y: scroll;
}
对我有用