Rails 3.1 ckeditor:在工具栏中添加字体大小? [英] Rails 3.1 ckeditor: Adding fontsize in toolbar?
本文介绍了Rails 3.1 ckeditor:在工具栏中添加字体大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有ckeditor在我的rails 3.1应用程序,但我不能添加字体大小和字体下拉到我的工具栏。
I have ckeditor in my rails 3.1 app but I am not able to add fontsize and font dropdowns to my toolbar.
我编辑视图代码:
<%= javascript_include_tag "ckeditor/ckeditor.js" %>
...
<%= form_for @page, :html => { :class => 'edit_page', :id => "page_form" } do |page| %>
...
<%= page.cktext_area :content, {:height => "350px", :width => "920px"}%>
...
<% end %>
我可以调整高度和宽度,但不能添加任何其他参数?
I am able to adjust the height and width but not add any other parameters?
推荐答案
可能迟到,但在 rails 3.1
应用程序,你可以去 /vendor/bundle/ruby/1.8/gems/ckeditor-3.7.0/vendor/assets/javascripts/ckeditor/config.js
这是工具栏的配置发生的地方。
Could be late but in rails 3.1
app you can go to /vendor/bundle/ruby/1.8/gems/ckeditor-3.7.0/vendor/assets/javascripts/ckeditor/config.js
this is where configuration for the toolbars takes place.
以下是我的配置示例:
..
...
/* Toolbars */
config.toolbar = 'Easy';
config.toolbar_Easy =
[
['Source','-','Preview'],
['Cut','Copy','Paste','PasteText','PasteFromWord',],
['Undo','Redo','-','SelectAll','RemoveFormat'],
['Styles','Format','FontSize'],['Maximize','-','About'],
['Subscript', 'Superscript', 'TextColor'],
['Bold','Italic','Underline','Strike'], ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Anchor'],
/* ['Image', 'Attachment', 'Flash', 'Embed'], */
['Table','HorizontalRule','Smiley','SpecialChar','PageBreak']
];
...
..
配置看起来是一种形式
这篇关于Rails 3.1 ckeditor:在工具栏中添加字体大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文