     , 1500
   , 50
 
+handleMagicReadMore = ->
+  $('.simple_form.edit_brick').submit ->
+  removeEmptyParagraphs()
+
 $(document).ajaxSuccess ->
   loadTextEditor($("body"))
+  handleMagicReadMore()
   sortableBrick()
 
 $(document).ready ->

  checkPageType()
  sortableBrick()
  initSubmitLinks()
  $('#page_page_type').change ->
    checkPageType()


        sortForm.trigger('submit')
      )

removeEmptyParagraphs = ->
  # Clear read_more_text field if it just contains an empty p tag
  #
  # readctor.js injects an almost empty p-tag into empty form fields.
  # However, instead of being really empty, it currently contains the &#8203; (Zero width space) Character.
  $('.brick_read_more_text .redactor_box textarea').each ->
    if ($(this).val() == "<p>\u200b</p>")
      $(this).val('')

window.initSubmitLinks = (selector = null)->
  selector ||= $('body')

