YUI Editor:如何使用CSS格式化编辑器窗口的内容?

发布于 2024-07-14 08:09:02 字数 362 浏览 6 评论 0原文

我已经实现了 YUI 编辑器 并想应用 CSS 来更改用户正在富文本编辑器内部处理的文本。

我正在使用 Ruby on Rails 的 yui_editor 插件,但这并没有意味着通用答案不受欢迎。 如果您可以向我指出正确的 API 部分和/或有关如何执行此操作的示例,那就更好了。

多谢!

I've implemented the YUI Editor and would like to apply a CSS to change the look of the text the user is working on inside the rich text editor.

I'm working with the yui_editor plugin for ruby on rails, but that doesn't mean that a generic answer wouldn't be welcome. It's even OK if you could just point me to the correct API section and/or an example on how to do this.

Thanks a lot!

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

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

发布评论

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

评论(1

终难遇 2024-07-21 08:09:02

与此同时,我自己找到了答案:这可以通过使用 css 配置属性 (YUI API)。

要使用 Rails 上的 yui_editor 插件实现此功能,我必须插入 css 属性,如 config/yui_editor.yml 中的以下代码片段所示:

editor_config_javascript: "
{
  handleSubmit: true,
  autoHeight: false,
  css: 'YADA { FOO: BAR; }',
  collapse: true,
  toolbar: ...
}

就是这样,就像一个魅力一样。

In the meantime, I've found the answer myself: This is possible by using the css Configuration Attribute (YUI API).

To implement this with the yui_editor plugin on rails, I had to insert the css-attribute as seen on the following code snippet in config/yui_editor.yml:

editor_config_javascript: "
{
  handleSubmit: true,
  autoHeight: false,
  css: 'YADA { FOO: BAR; }',
  collapse: true,
  toolbar: ...
}

That's it, works like a charm.

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