How to set editor width and height?
See original GitHub issueI’m sorry if it’s not the place to ask but I can’t seem to be able to set the editor to have a fixed width and height. My code is
$('#myEditor').summernote({
height: 20,
width: 320,
disableResizeEditor: true,
airMode: true,
popover: {
air: [
// [groupName, [list of button]]
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['strikethrough', 'superscript', 'subscript']],
['insert', ['link']]
],
link: [
['link', ['linkDialogShow', 'unlink']]
]
},
callbacks: {
onEnter: function (e) {
e.preventDefault();
},
onPaste: function (e) {
var bufferText = ((e.originalEvent || e).clipboardData || window.clipboardData).getData('Text');
e.preventDefault();
document.execCommand('insertText', false, bufferText.replace(/\n/g, ''));
}
}
});
The editor width is not set using the config above. Note that I am also using Bootstrap, if that makes a difference (I saw some issues about this). As soon as I type more text the editor grows. Basically I would like the field to behave like an input text field. Is there a way to set the width and height in the config? Do I have to try to set the DOM properties myself?
steps to reproduce
- See code above
browser version and os version and summernote version
What is your browser and OS? Chrome latest version What is your summernote version? 0.8.7
screenshot of issue
Add screenshots which shows your issue(if needed). See Help Text box
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Editor Size - CKEditor 4 Documentation
The easiest way to achieve that is to use the CKEDITOR.config.width and CKEDITOR.config.height settings to adjust the editor user interface size. The image ......
Read more >Settings | Height and Width - Imperavi
This setting allows to set minimum height for Redactor. ... This setting defines maximum width of content inside of Redactor. This setting doesn't...
Read more >Summernote, set editor width and height - Stack Overflow
I can't seem to be able to set the editor to have a fixed width and height. My code is $('#myEditor').summernote({ height: 20,...
Read more >Editor size and resize options | TinyMCE Documentation
height sets the height of the entire editor, including the menu bar, toolbars, and status bar. ... TinyMCE sets the width in pixels...
Read more >Measurements in Editor X | Wix Fix - YouTube
Learn about all the different types of measurements inside of Editor X. Editor X has pixels, percentages, viewport width & viewport heights.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Pelo que entendi a altura é de padrão automática. Só precisei definir uma largura.
I fixed it by setting the div containing summernote with style=“width:320px; max-width:320px;”