Reputation: 2191
I use summernote and it's codeview. 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();
}
}
});
Upvotes: 0
Views: 2571