Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 24 lines (18 sloc) 0.997 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
# Make sure the tiny_mce gem has been loaded before we declare any plugins
require 'tiny_mce'

# We need to make sure that the TinyMCE Editor sources are already in place
# or any changes we make may be overwritten later
TinyMCE.install_or_update_tinymce

# Create the TinyMCE Paste Plugin. Inherit from TinyMCE::Plugin which sets a
# default self.install method, which installs all files in self.assets_path
# into the public/javascripts/tiny_mce directory
class TinyMCEPaste < TinyMCE::Plugin

  # This lets the TinyMCE::Plugin classes install method know where to find
  # the assets we need to install. If were overwrite the self.install method
  # here, then we don't need to provide this line
  self.assets_path = File.join(File.dirname(__FILE__), 'assets')

end

# Finally, tell the TinyMCEPaste Plugin to install itself. The install method
# can be overwritten in the class definition above. TinyMCE::Plugin provide a
# default one that will work fine in this example
TinyMCEPaste.install
Something went wrong with that request. Please try again.