Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Integration of TinyMCE with the Rails 3.1 asset pipeline

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 app
Octocat-spinner-32 lib
Octocat-spinner-32 sandbox
Octocat-spinner-32 vendor
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 locomotive-tinymce-rails.gemspec
README.md

Rails 3.2 Integration for TinyMCE

The tinymce-rails gem integrates the TinyMCE editor with the Rails 3.2 asset pipeline.

Instructions

1. Add tinymce-rails to your Gemfile

gem 'tinymce-rails'

Then run bundle install.

**2. Use TinyMCE

Add to your application.js:

//= require tinymce-jquery

and use TinyMCE in your view:

<%= text_area_tag :editor, "", :rows => 40, :cols => 120 %>

<script type="text/javascript">
  $(function() {
    $('textarea').tinymce({
      theme: 'advanced'
    });
  });
</script>

Custom Plugins & Skins

To use custom plugins or skins, simply add the files to your asset load path so that they are locatable at a path beneath tinymce/plugins/ or tinymce/themes/advanced/skins/.

For example, a plugin called mycustomplugin could have its main JS file at app/assets/javascripts/tinymce/plugins/mycustomplugin/editor_plugin.js.

Any files with a path beginning with tinymce/ will be automatically precompiled.

Updating

When new versions of TinyMCE are released, simply update the tinymce-rails gem to the latest version. There is no need to run any extra rake tasks (apart from rake assets:precompile).

Something went wrong with that request. Please try again.