Getting Started


  1. Download (zip, tgz) the tinymce_hammer plugin and copy it to:


  2. Run:

    script/generate tinymce_installation

    The default install path is RAILS_ROOT/public/javascripts/tiny_mce. See configuration for help with changing the installation path.

Basic Usage

Now we need to enable TinyMCE with the following function, just call it somewhere in your layout (inside the head tags, at the end of the document, etc).

    <title>Lazy Load Example</title>
    <%= init_tinymce_hammer_if_required %>

The method above will insert a pair of script tags whenever there is a TinyMCE editor on the page. It knows to do this anytime you use one of the 3 basic helpers. Each of these helpers behave exactly like their text_area cousins. They even accept the same parameters.

<%= tinymce_tag('comment', 'Your comment goes here ...') %>
<%= tinymce(:comment, :body) %>
<%- form_for @comment do |form| -%>
  <%= form.label :body %>
  <%= form.tinymce :body %>
<% end %>

Next Step

Now that you are up and running you probably want to customize how the TinyMCE editor looks and acts for your website.

Next tutorial, configuring TinyMCE with TinyMCEHammer