Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
When you are adding long content in CKEditor 5 classic, on scroll the toolbar becomes fixed to the top in the browser window.
But I have a fixed positioned white logo area with a menu bar beneath and the toolbar appears above them:
How can I make it stay under my fixed header/navigation?
You have to install
npm install --save @ckeditor/ckeditor5-ui
Add to the config:
viewportTopOffset : Number
example:
ClassicEditor.defaultConfig = {
toolbar: {
viewportTopOffset : 50, <-- height of fixed header
items: [
'heading',
'highlight',
'bold',
'italic',
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.