admin管理员组文章数量:1240574
How can I set the default font size of tinyMCE , I've a tinyMCE editor and I tried all the things to change the text-size to 14px and it always shows 10px. I'm using rails 3.1 and tinymce major Version: '3', and minor Version: '4.4'.
I changed tinymce/themes/advanced/skins/default/content.css font-size to 14px I even add
tinyMCE.init({
theme_advanced_font_sizes: "10px,12px,13px,14px,16px,18px,20px",
font_size_style_values: "12px,13px,14px,16px,18px,20px",
});
and
body, td, pre { color: #000; font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px; margin: 8px; }
How can I set the default font size of tinyMCE , I've a tinyMCE editor and I tried all the things to change the text-size to 14px and it always shows 10px. I'm using rails 3.1 and tinymce major Version: '3', and minor Version: '4.4'.
I changed tinymce/themes/advanced/skins/default/content.css font-size to 14px I even add
tinyMCE.init({
theme_advanced_font_sizes: "10px,12px,13px,14px,16px,18px,20px",
font_size_style_values: "12px,13px,14px,16px,18px,20px",
});
and
body, td, pre { color: #000; font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px; margin: 8px; }
Share
Improve this question
edited Dec 8, 2011 at 9:23
Helgi
5,4361 gold badge33 silver badges48 bronze badges
asked Nov 7, 2011 at 19:59
JayJay
3221 gold badge6 silver badges21 bronze badges
3
- 1 Did you empty your browser's cache? Sometimes you have to do that to ensure TinyMCE is not using an older file. – Kamil Sindi Commented Nov 7, 2011 at 21:22
- Thanks bro!! U save my day....kill me.. – Jay Commented Nov 7, 2011 at 21:33
- 2 @tuva: I know this is an old post. But just today I came accross this and I also edited the content.css and it did not work no matter if I cleared my cache or not. Then I found it on the tinyMCE website: tinymce./wiki.php/Configuration:content_css that you actually have to make a copy of the content.css file otherwise (so they say) it will have no effect. Which makes Jona's answer the correct one. – Nikola Commented Jun 13, 2012 at 13:34
2 Answers
Reset to default 7You can load a custom stylsheet for the textarea:
tinyMCE.init({
content_css : "custom_content.css"
});
In there you can style your fonts like on a normal page.
You need to empty you browser's cache. Sometimes you have to do that to ensure TinyMCE is not using an older file.
[As @Jona and @Nikola said, please make sure you are referencing a new CSS flle].
本文标签: javascriptTinyMCE default font sizeStack Overflow
版权声明:本文标题:javascript - TinyMCE default font size - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1739996974a2219391.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论