gpt4 book ai didi

button - CKEDITOR - 带文本的工具栏按钮

转载 作者:行者123 更新时间:2023-12-03 03:31:20 33 4
gpt4 key购买 nike

我有一个插件可以通过 Ajax 保存编辑器内容。现在工具栏上的按钮有一个图像。我想将其更改为粗体文本,拼写出“保存”。这可能吗?

这是我的插件中当前的按钮。

    editor.ui.addButton('ajax-save', {
label: I18n.t('js.save'),
command: ajax-save,
className : 'cke_ajax_save'
});

最佳答案

将其添加到您的样式表中:

.cke_button__[[lowercased button name]]_label {
display: inline !important
}

例如,CKEditor 默认情况下包含以下规则来在 Source 按钮中显示文本:

.cke_button__source_label {
display: inline
}

(注意:编辑器样式中没有 important 标志,因为此样式是在默认 display: none 规则之后设置的。在您的情况下,我建议使用为了简单起见,important 标志。)

关于button - CKEDITOR - 带文本的工具栏按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28707589/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com