Every text_area I make gets the tiny mce editor.
How to disable tinymce editor on certain text area fields?
I have followed this installation guide. https://github.com/kete/tiny_mce
My controller:
class Admin::KategorisController < Admin::AdminController
uses_tiny_mce(:options => { :theme => 'simple'}, :editor_selector => 'mceEditor')
end
Part of my form:
<%= f.input :name, :label => 'Navn' %>
<%= f.input :title, :label => 'URL titel' %>
<%= f.input :keywords, :label => 'Keywords' %>
<%= f..text_area :meta :cols => 80, :rows => 20, :label => 'META', :class => 'asdasd' %>
<%= f.text_area :text, :cols => 80, :rows => 20 %>
Both meta and text is a tinymce editor in view
If I use this in controller:
uses_tiny_mce(:options => { :theme => 'simple', :class => "mceEditor"})
I get this error:
TinyMCE::TinyMCEInvalidOption in Admin/kategoris#edit
Showing C:/Rails/konkurranceportalen/app/views/layouts/admin.erb where line #11 raised:
Invalid option class passed to tinymce
Extracted source (around line #11):
8: <%= javascript_include_tag :defaults %>
9: <%= javascript_include_tag "Highcharts" %>
10: <%= javascript_include_tag :all %>
11: <%= include_tiny_mce_if_needed %>
12: <script type="text/javascript">
13: tinyMCE.init({
14: height : "50px"