更新时间:2023-11-24 14:41:16
使用 insert_editor_css 钩子为编辑器提供额外的CSS文件。
Use the insert_editor_css hook to provide additional CSS files to the editor.
@hooks.register('insert_editor_css')
def editor_css():
return format_html(
'<link rel="stylesheet" href="{}">',
static('demo/css/editor-overrides.css')
)
在您的hallohtml插件JS中,将 icon-hallohtml
分配给该按钮,并使用以下CSS将其与H字符进行样式: p>
In your hallohtml plugin JS, assign icon-hallohtml
to the button and use the following CSS to style it with an H character:
.hallotoolbar .halloformat .ui-button-text .icon-hallohtml:before {
content:'H';
}