Getting started

5 views
Skip to first unread message

findin...@googlemail.com

unread,
Feb 4, 2010, 7:33:08 AM2/4/10
to tinymce_hammer
I have followed your tutorial getting started (http://
tinymcehammer.lanalot.com/tutorials/getting_started/)
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_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

trevorrowe

unread,
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, "findingst...@googlemail.com"

Reply all
Reply to author
Forward
0 new messages