Getting started

Skip to first unread message

Feb 4, 2010, 7:33:08 AM2/4/10
to tinymce_hammer
I have followed your tutorial getting started (http://
I have no page error's but the problem is that the tinymce editor is
not appearing. What do I have to do to yield just simply above my form
body text_area?

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_buttons2, ''],
[:theme_advanced_buttons3, ''],
[:valid_elements, "a[href|


Added to header of post layout:

<%= init_tinymce_hammer_if_required %>


Added to edit view:

<% form_for(@post) do |f| %>
<%= f.error_messages %>

<%= f.label :title %><br />
<%= f.text_field :title %>
<%= f.label :body %><br />
<%= f.tinymce :body %>
<%= f.submit 'Create' %>
<% 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


Feb 4, 2010, 10:26:32 AM2/4/10
to tinymce_hammer
Your usage looks line, at least I can't see anything obviously wrong.
Have you restarted your application after installing the plugin and
are you running Rails 2.3.+?

On Feb 4, 4:33 am, ""

Reply all
Reply to author
0 new messages