简体   繁体   English

在CKEditor 5中动态调整粘性工具栏的位置

[英]Dynamically adjust sticky toolbar's position in CKEditor 5

Here's the Classic editor demo page . 这是Classic编辑器演示页面 Please add some text until it's height is bigger than your screen. 请添加一些文本,直到其高度大于屏幕。 Then if you click inside the editor and start scrolling down, you'll see that the toolbar becomes sticky when it hits the top of the page. 然后,如果您在编辑器中单击并开始向下滚动,则会看到工具栏到达页面顶部时变粘。
It uses viewportTopOffset property . 它使用viewportTopOffset属性

How can I change the toolbars position on window resize or if the height of the fixed header changes? 如何更改窗口调整大小时工具栏的位置,或者固定标题的高度是否发生变化?

Unfortunately, it's a known issue. 不幸的是,这是一个已知问题。 You can re-report it there or give a reaction to increase its priority: https://github.com/ckeditor/ckeditor5-ui/issues/405 . 您可以在那里重新报告它,或做出反应以提高其优先级: https : //github.com/ckeditor/ckeditor5-ui/issues/405

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM