Skip to content
Browse files

Adding support for tiny_mce plugins, which add plugins after tiny_mce…

… is setup
  • Loading branch information...
1 parent 26b4eb8 commit 16ab9054888ea39eead897226d72b3eaf6c20578 Kieran Pilkington committed Jun 4, 2010
Showing with 11 additions and 0 deletions.
  1. +11 −0 lib/tiny_mce.rb
View
11 lib/tiny_mce.rb
@@ -72,6 +72,17 @@ def self.install_or_update_tinymce
module Base
include TinyMCE::SpellChecker
end
+
+ # Plugin Support
+ class Plugin
+ cattr_accessor :assets_path
+ def self.install
+ return unless File.directory?(self.assets_path)
+ require 'fileutils'
+ puts "Installing #{self.name} plugin assets from #{self.assets_path}"
+ FileUtils.cp_r "#{self.assets_path}/.", File.join(Rails.root.to_s, 'public', 'javascripts', 'tiny_mce')
+ end
+ end
end
# Finally, lets include the TinyMCE base and helpers where

0 comments on commit 16ab905

Please sign in to comment.
Something went wrong with that request. Please try again.