YUI编辑器隐藏标题栏?

发布于 2024-08-02 02:30:29 字数 71 浏览 2 评论 0原文

是否可以隐藏 YUI 编辑器创建的标题栏? 我想让编辑器在没有标题栏的标签中呈现,并且无法折叠工具栏。 任何建议都非常感激。

Is it possible to hide the title bar created by the YUI editor? I want to have the editor rendered in a tag without the titlebar and unable to collapse the toolbar.
Any suggestions greatly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

回眸一遍 2024-08-09 02:30:29

您可以使用 CSS 隐藏标题栏。

#editor-container .yui-toolbar-titlebar {
 display: none;
}

#editor-container 应该是包含 div 的 id。 有关更多示例,请查看 YUI 团队的换肤编辑器示例

You can use CSS to hide the titlebar.

#editor-container .yui-toolbar-titlebar {
 display: none;
}

#editor-container should be the id of the containing div. For more examples, check out the skinning editor example from the YUI team.

一萌ing 2024-08-09 02:30:29

您还可以从配置中删除 titlebar: 'Text Editing Tools', 行,并将 Collapse 设置为 false:

{
  handleSubmit: true,
  autoHeight: false,
  dompath: false,
  collapse: false,
  toolbar: {
    collapse: false,
    draggable: false,
    buttonType: 'advanced',
    buttons: [
        { group: 'textstyle',
            buttons: [
                { type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' },
                { type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' },
                { type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' },
            ]
        },             
        { type: 'separator' },
        { group: 'indentlist',
            buttons: [
                { type: 'push', label: 'Indent', value: 'indent', disabled: true },
                { type: 'push', label: 'Outdent', value: 'outdent', disabled: true },
                { type: 'push', label: 'Create an Unordered List', value: 'insertunorderedlist' },
                { type: 'push', label: 'Create an Ordered List', value: 'insertorderedlist' }
            ]
        }        
    ]
  }
}

You can also remove the titlebar: 'Text Editing Tools', line from the configuration, and set collapse to false:

{
  handleSubmit: true,
  autoHeight: false,
  dompath: false,
  collapse: false,
  toolbar: {
    collapse: false,
    draggable: false,
    buttonType: 'advanced',
    buttons: [
        { group: 'textstyle',
            buttons: [
                { type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' },
                { type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' },
                { type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' },
            ]
        },             
        { type: 'separator' },
        { group: 'indentlist',
            buttons: [
                { type: 'push', label: 'Indent', value: 'indent', disabled: true },
                { type: 'push', label: 'Outdent', value: 'outdent', disabled: true },
                { type: 'push', label: 'Create an Unordered List', value: 'insertunorderedlist' },
                { type: 'push', label: 'Create an Ordered List', value: 'insertorderedlist' }
            ]
        }        
    ]
  }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文