I have downloaded tinymce_hammer and place it in vendor/plugins
ran command: script/generate tinymce_installation
---------------------------------------------------------------------------
set configurations config/initializers/tinymce_hammer.rb:
Tinymce::Hammer.install_path = '/javascripts/tiny_mce'
Tinymce::Hammer.plugins = %w(safari table paste paste2 tabfocus)
Tinymce::Hammer.init = [
[:elements, 'textareas, post_body, title, body, post_commentbody'],
[:paste_convert_headers_to_strong, true],
[:paste_convert_middot_lists, true],
[:paste_remove_spans, true],
[:paste_remove_styles, true],
[:paste_strip_class_attributes, true],
[:theme, 'advanced'],
[:theme_advanced_toolbar_align, 'left'],
[:theme_advanced_toolbar_location, 'top'],
[:theme_advanced_buttons1,
'undo,redo,cut,copy,paste,pastetext,|,bold,italic,strikethrough,blockquote,charmap,bullist,numlist,removeformat,|,link,unlink,image,|,cleanup,code'],
[:theme_advanced_buttons2, ''],
[:theme_advanced_buttons3, ''],
[:valid_elements, "a[href|
title],blockquote[cite],br,caption,cite,code,dl,dt,dd,em,i,img[src|alt|
title|width|height|align],li,ol,p,pre,q[cite],small,strike,strong/
b,sub,sup,u,ul"],
]
---------------------------------------------------------------------------
Added to header of post layout:
<%= init_tinymce_hammer_if_required %>
---------------------------------------------------------------------------
Added to edit view:
<% form_for(@post) do |f| %>
<%= f.error_messages %>
<p>
<%= f.label :title %><br />
<%= f.text_field :title %>
</p>
<p>
<%= f.label :body %><br />
<%= f.tinymce :body %>
</p>
<p>
<%= f.submit 'Create' %>
</p>
<% end %>
---------------------------------------------------------------------------
What am I missing here, am I right in thinking that as long as I use
the tinymce helper (<%= f.tinymce :body %>) in the view it will
automatically rendering (display) the the editor ?
Pretty new to rails so be easy on me.
Thanks Dan
On Feb 4, 4:33 am, "findingst...@googlemail.com"