Module: ActiveScaffold::TinyMceBridge::FormColumnHelpers

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_input_text_editor(column, options) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/bridges/tiny_mce/lib/tiny_mce_bridge.rb', line 19

def active_scaffold_input_text_editor(column, options)
  options[:class] = "#{options[:class]} mceEditor #{column.options[:class]}".strip
  html = []
  html << send(override_input(:textarea), column, options)
  html << javascript_tag("tinyMCE.execCommand('mceAddControl', false, '#{options[:id]}');") if request.xhr?
  html.join "\n"
end

#onsubmitObject



27
28
29
30
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/bridges/tiny_mce/lib/tiny_mce_bridge.rb', line 27

def onsubmit
  submit_js = 'tinyMCE.triggerSave();this.select("textarea.mceEditor").each(function(elem) { tinyMCE.execCommand("mceRemoveControl", false, elem.id); });' if using_tiny_mce?
  [super, submit_js].compact.join ';'
end