Class: ActiveScaffold::Bridges::TinyMce

Inherits:
DataStructures::Bridge show all
Defined in:
lib/active_scaffold/bridges/tiny_mce.rb,
lib/active_scaffold/bridges/tiny_mce/helpers.rb

Defined Under Namespace

Modules: Helpers

Class Method Summary collapse

Methods inherited from DataStructures::Bridge

prepare, run, stylesheets

Class Method Details

.installObject



3
4
5
# File 'lib/active_scaffold/bridges/tiny_mce.rb', line 3

def self.install
  ActionView::Base.class_eval { include ActiveScaffold::Bridges::TinyMce::Helpers }
end

.install?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/active_scaffold/bridges/tiny_mce.rb', line 7

def self.install?
  Object.const_defined? 'TinyMCE'
end

.javascriptsObject



11
12
13
14
15
16
17
18
# File 'lib/active_scaffold/bridges/tiny_mce.rb', line 11

def self.javascripts
  case ActiveScaffold.js_framework
  when :jquery
    ['tinymce-jquery', 'jquery/tiny_mce_bridge']
  when :prototype
    ['tinymce', 'prototype/tiny_mce_bridge']
  end
end