Sha256: c8549d4afc8e1e1aa1ae8d7e8252a0768420e3c507b3f6ea3e275b410ddd661a

Contents?: true

Size: 717 Bytes

Versions: 2

Compression:

Stored size: 717 Bytes

Contents

(function () {
  'use strict'

  // --- functions -------------------------------------------------------------
  function initMediumEditors() {
    $('[data-aa-medium-editor]').each(function () {
      if (!$(this).hasClass('medium-editor--active')) {
        let options = {}
        options = $.extend({}, options, $(this).data('options'))
        new MediumEditor($(this), options)
        $(this).addClass('medium-editor--active')
      }
    })
  }

  // --- events ----------------------------------------------------------------
  $(document).ready(initMediumEditors)
  $(document).on('has_many_add:after', '.has_many_container', initMediumEditors)
  $(document).on('turbolinks:load', initMediumEditors)
})()

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activeadmin_medium_editor-1.0.0 app/assets/javascripts/activeadmin/medium_editor_input.js
activeadmin_medium_editor-0.2.14 app/assets/javascripts/activeadmin/medium_editor_input.js