如何使用tinymce content.css在rails [英] how to use tinymce content.css in rails
本文介绍了如何使用tinymce content.css在rails的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要提供一个css文件来接受样式,但如果我在任何文件中设置
I need to provide tinymce a css file to take the styles from, but if I set in any file something like
body{
font-size: 14px;
}
它会将webapp的主体设置为该样式,而不仅仅是tinymce的输入框。
it will set the webapp's body to that style and not only tinymce's input box.
如何向涉及的资产管道提供一个包含content.css文件的tinymce?
How do I give tinymce a content.css file with the asset pipeline involved?
推荐答案
正确的格式是写
body.mceContentBody {
font-size: 14px;
}
或在TinyMCE 4.x / p>
or in TinyMCE 4.x (class name changed)
body.mce-content-body {
font-size: 14px;
}
且tinymce(如果使用gem)应为
and the tinymce (if using the gem) should be
<%= tinymce :content_css => asset_path('application.css')%>
这篇关于如何使用tinymce content.css在rails的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文