Module: ActiveScaffold::TinyMceBridge::ViewHelpers

Defined in:
lib/six-updater-web/vendor/plugins/active_scaffold/lib/bridges/tiny_mce/lib/tiny_mce_bridge.rb

Instance Method Summary collapse

Instance Method Details

#active_scaffold_includes(*args) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/bridges/tiny_mce/lib/tiny_mce_bridge.rb', line 4

def active_scaffold_includes(*args)
  tiny_mce_js = javascript_tag(%|
var action_link_close = ActiveScaffold.ActionLink.Abstract.prototype.close;
ActiveScaffold.ActionLink.Abstract.prototype.close = function() {
  this.adapter.select('textarea.mceEditor').each(function(elem) {
    tinyMCE.execCommand('mceRemoveControl', false, elem.id);
  });
  action_link_close.apply(this);
};
  |) if using_tiny_mce?
  super(*args) + (include_tiny_mce_if_needed || '') + (tiny_mce_js || '')
end