Sha256: ac3aec926697bd4b3d4aa8df52bb55aab50dc5f5112de3ef5ba3e0f324ab9d46
Contents?: true
Size: 533 Bytes
Versions: 1
Compression:
Stored size: 533 Bytes
Contents
@Mercury.modalHandlers.htmlEditor = -> # fill the text area with the content content = Mercury.region.content(null, true, false) # content = jQuery.htmlClean(content, {format: true, replace: [], allowedClasses: ['mercury-snippet']}) @element.find('textarea').val(content) # replace the contents on form submit @element.find('form').submit (event) => event.preventDefault() value = @element.find('textarea').val().replace(/\n/g, '') Mercury.trigger('action', {action: 'replaceHTML', value: value}) @hide()
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mercury-rails-0.2.3 | vendor/assets/javascripts/mercury/modals/htmleditor.js.coffee |