[英]Summernote codeview text overflow wrap
I use summernote and it's codeview. 我使用summernote及其代码视图。 My problem is that if the string is to long, it goes into infinity.
我的问题是,如果字符串太长,它将变为无穷大。 I would like to overflow wrap it.
我想溢出包装它。 So I don't need to scroll horizontally.
因此,我不需要水平滚动。
Any cluses? 有什么规律吗?
Here is my initiation code. 这是我的启动代码。
var summernote = $('#description').summernote({
height: 1000, // set editor height
minHeight: null, // set minimum height of editor
maxHeight: null, // set maximum height of editor
maxWidth: 100, // set maximum width of editor
toolbar: [
['style', ['style']],
['font', ['bold', 'italic', 'underline', 'clear']],
// ['font', ['bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'clear']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['insert', ['link', 'picture', 'hr']],
['view', ['fullscreen', 'codeview']], // remove codeview button
['help', ['help']]
],
codemirror: {
mode: 'text/html',
htmlMode: true,
lineNumbers: true,
theme: 'monokai'
},
callbacks: {
onInit: function() {
console.log('Summernote is launched');
$(this).summernote('codeview.activate');
$('#title').focus();
}
}
});
add 加
lineWrapping: true,
after lineNumbers: true, works for me 在lineNumbers之后:true,对我有用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.