When I create the sceditor like in the example, the dropdowns that appear when clicking on the font icon appears in its normal place.
var textarea = document.getElementById('example');
sceditor.create(textarea, {
format: 'bbcode',
icons: 'monocons',
autofocus: true,
style: '../minified/themes/content/default.min.css'
});
However, once I specify my own toolbar, the dropdown is moved off screen and I have to scroll down for ages to find it.
var textarea = document.getElementById('example');
sceditor.create(textarea, {
format: 'bbcode',
icons: 'monocons',
autofocus: true,
style: '../minified/themes/content/default.min.css',
toolbarContainer: document.getElementById('toolbar')
});
Any way to correct the positioning while having a custom toolbar?
Custom toolbars are outside the sceditor container, which has a relative position. According to https://stackoverflow.com/a/14107783/4710434
Therefore, remove the relatie position specifier for .sceditor-container` from the CSS file.
Now, the dropdown is relative to the doucment's body, and must be moved. Fortunately,
editor.createDropDown()can be overridden via a simple plugin