Height always take up entire body
Describe the bug The height of the editor will always take up the entire height of the body.
To Reproduce
<link rel="stylesheet" href="node_modules/suneditor/dist/css/suneditor.min.css">
<style>
body {
background-color: black;
height: 1000%;
}
</style>
<textarea id="myEditor"></textarea>
<script src="node_modules/suneditor/dist/suneditor.min.js"></script>
<script>
const myEditor = SUNEDITOR.create('myEditor', {
resizingBar: false,
width: '100%',
height: '400px',
});
</script>
Expected behavior The height of the editor will be 400px.
Screenshots None
Desktop (please complete the following information):
- OS: Linux Mint 21.1
- Browser Firefox Developer Edition
- Version 2.44.3
Smartphone (please complete the following information):
- Device: LG V20
- OS: Android
- Browser Fennec
- Version 2.44.3
Additional context None
This issue is not reproduced.
Check the code such as whether the height value is being entered in the generated html.

2.44.6 and it does show the height is added to the element in the browser.
<link rel="stylesheet" href="node_modules/suneditor/dist/css/suneditor.min.css">
<style>
body {
background-color: black;
height: 1000%;
}
</style>
<textarea id="myEditor"></textarea>
<script src="node_modules/suneditor/dist/suneditor.min.js"></script>
<script>
const myEditor = SUNEDITOR.create('myEditor', {
resizingBar: false,
width: '100%',
height: 400,
});
</script>
This still persists in v2.45.1
However I think I found the issue. It is the height and width property for the .se-container class.
Here is my code
<link rel="stylesheet" href="node_modules/suneditor/dist/css/suneditor.min.css">
<style>
body {
background-color: red;
}
</style>
<textarea id="myEditor"></textarea>
<script src="node_modules/suneditor/dist/suneditor.min.js"></script>
<script>
SUNEDITOR.create('myEditor', {
// Configuration options
height: '400',
width: '1200',
buttonList: [
['undo', 'redo'],
['font', 'fontSize', 'formatBlock'],
['bold', 'underline', 'italic', 'strike', 'subscript', 'superscript'],
['removeFormat'],
['fontColor', 'hiliteColor'],
['outdent', 'indent'],
['align', 'horizontalRule', 'list', 'table'],
['link', 'image', 'video'],
['fullScreen', 'showBlocks', 'codeView'],
['preview', 'print'],
['save', 'template']
]
});
</script>
And here is a picture of fixing the issue by disabling the height and width property in the .se-container class.
Opened my first pull request to solve this issue https://github.com/JiHong88/suneditor/pull/1416
