【问题标题】:Positioning toolbar to page top将工具栏定位到页面顶部
【发布时间】:2015-10-27 18:29:12
【问题描述】:

如何使编辑器工具栏位于上方?我使用内联编辑,如果在页面结束之前滚动站点,工具栏会向下传递。

【问题讨论】:

    标签: ckeditor


    【解决方案1】:

    使用sharedspace 可以帮助您。 您可以在此处找到类似的问题和解决方案: How to make the inline ckeditor toolbar fixed at the top and not float

    插件的实现如下所示:

    <div id="toolbarLocation></div>
    <div id="editor" contenteditable="true"></div>
    
    <script>
    
         CKEDITOR.disableAutoInline = true;
         CKEDITOR.replace( 'editor', { 
             sharedSpaces: { 
                 top: 'toolbarLocation' 
             } 
         } );
    
    </script>
    

    【讨论】:

    • 虽然此链接可能会回答问题,但最好在此处包含答案的基本部分并提供链接以供参考。如果链接页面发生更改,仅链接的答案可能会失效。
    • 刚刚添加了其他答案的代码,谢谢回复。
    猜你喜欢
    • 2011-11-05
    • 1970-01-01
    • 2015-10-08
    • 2022-10-17
    • 1970-01-01
    • 1970-01-01
    • 2011-04-25
    • 2020-07-02
    • 2011-02-10
    相关资源
    最近更新 更多