我有一个events.html.haml文件。我希望第一个文本区域有一个自定义插件,主题:简单。
下一个文字区域,我希望它包含我在config/tinymce.yml
这是我的代码:
= form_for @event, :url => profile_events_path, :html => {:multipart => true} do |event|
=render "shared/error_messages", :object => @event
%label{:for => "title"} Title:
%br
= event.text_area :title,:class=>"tinymce", :theme => "simple"
%br
%label{:for => "image"} File:
%br
= event.file_field :image
%br
%label{:for => "date"} Date:
%br
= event.text_field :date
%br
%label{:for => "location"} Location:
%br
= event.text_field :location
%br
%label{:for => "description"} Description:
%br
= tinymce
= event.text_area :description,:class => "tinymce"
%br
-if current_user.admin
//%label{:for => "featured"} Feature:
//%br
//= event.check_box :featured
//%br
%label{:for => "special"} Special/Featured:
%br
= event.check_box :special
%br
%br
= submit_tag "Add Event"
问题在于,每当我将tinymce theme=>"simple"
代码与=tinymce
放在一起时,它将两个文本区域变为简单。我希望第一个是简单的,另一个是高级的。
这是我的yml文件
theme_advanced_toolbar_location: top
theme_advanced_toolbar_align: left
theme_advanced_statusbar_location: bottom
theme_advanced_buttons1_add:
- forecolor
- fontselect
- formatselect
theme_advanced_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1"
theme_advanced_buttons3_add:
- tablecontrols
- fullscreen
- emotions
- styleprops
- preview
- media
plugins:
- table
- fullscreen
- emotions
- style
- preview
- media
apply_source_formatting : true
theme_advanced_more_colors : true
答案 0 :(得分:0)
使用mode specific_textareas
和editor_selector
来解决定义的textareas
...
mode : "specific_textareas",
editor_selector : "mceEditor"
...