add_editor_style() 在 3.0.3 中不起作用

发布于 2024-10-09 19:14:35 字数 348 浏览 0 评论 0原文

我正在尝试使用 add_editor_style() 添加自定义编辑器样式。

template.php 中,我添加了:

<?php
add_editor_style();

我的主题目录中有一个名为 editor-style.css 的样式表,其中包含以下 css:

/* editor-style.css */
div { background-color: orange;}
p {color: red!important; font-size: 18px!important; }

I'm trying to use add_editor_style() to add custom editor styles.

In template.php I've added:

<?php
add_editor_style();

I have a stylesheet in my theme directory called editor-style.css with the following css:

/* editor-style.css */
div { background-color: orange;}
p {color: red!important; font-size: 18px!important; }

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

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

发布评论

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

评论(1

╭ゆ眷念 2024-10-16 19:14:35

我相信 add_editor_style() 必须在 functions.php 中才能工作。

I believe add_editor_style() must be in functions.php to work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文