Sha256: e05e94715553051d3c73e987e25abf66d107732f3ca90b431dd5646e064d2c1b

Contents?: true

Size: 434 Bytes

Versions: 8

Compression:

Stored size: 434 Bytes

Contents

@Mercury.modalHandlers.htmlEditor = ->
  # fill the text area with the content
  content = Mercury.region.content(null, true, false)
  @element.find('textarea').val(content)

  # replace the contents on form submit
  @element.find('form').on 'submit', (event) =>
    event.preventDefault()
    value = @element.find('textarea').val().replace(/\n/g, '')
    Mercury.trigger('action', {action: 'replaceHTML', value: value})
    @hide()

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
kiteditor-1.0.4 vendor/assets/javascripts/mercury/modals/htmleditor.js.coffee
kiteditor-1.0.2 vendor/assets/javascripts/mercury/modals/htmleditor.js.coffee
kiteditor-1.0.1 vendor/assets/javascripts/mercury/modals/htmleditor.js.coffee
mercury-rails-0.6.0 app/assets/javascripts/mercury/modals/htmleditor.js.coffee
mercury-rails-0.5.0 app/assets/javascripts/mercury/modals/htmleditor.js.coffee
kuji-mercury-rails-0.3.3 vendor/assets/javascripts/mercury/modals/htmleditor.js.coffee
kuji-mercury-rails-0.3.2 vendor/assets/javascripts/mercury/modals/htmleditor.js.coffee
mercury-rails-0.3.1 vendor/assets/javascripts/mercury/modals/htmleditor.js.coffee