Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Integration of TinyMCE with the Rails 3.1 asset pipeline

License

NotificationsYou must be signed in to change notification settings

rekomendme/tinymce-rails

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thetinymce-rails gem integrates theTinyMCE editor with the Rails 3.1 asset pipeline.

Instructions

1. Addtinymce-rails to your Gemfile

gem 'tinymce-rails'

Then runbundle install.

2a. Use TinyMCE with the jQuery extension

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>

2b. Use TinyMCE without jQuery

Add to your application.js:

//= require tinymce

Use TinyMCE in your view:

<%= text_area_tag :editor, "", :rows => 40, :cols => 120 %><script type="text/javascript">  tinyMCE.init({    mode: 'textareas',    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 beneathtinymce/plugins/ ortinymce/themes/advanced/skins/.

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

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

Updating

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

About

Integration of TinyMCE with the Rails 3.1 asset pipeline

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript96.8%
  • Ruby3.2%

[8]ページ先頭

©2009-2025 Movatter.jp