Sha256: 2bd80ccad5be22274db6cfd1d1918067ae6009d5bc5f13b1b0b5be57a3e78c71

Contents?: true

Size: 454 Bytes

Versions: 2

Compression:

Stored size: 454 Bytes

Contents

function initMediumEditors() {
  $('.medium-editor').each(function() {
    if(!$(this).hasClass('medium-editor--active')) {
      var options = {};
      options = $.extend({}, options, $(this).data('options'));
      new MediumEditor($(this), options);
      $(this).addClass('medium-editor--active');
    }
  });
}

$(document).on('has_many_add:after', function() {
  initMediumEditors();
});

$(document).ready(function() {
  initMediumEditors();
});

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activeadmin_medium_editor-0.2.8 app/assets/javascripts/activeadmin/medium_editor_input.js
activeadmin_medium_editor-0.2.4 app/assets/javascripts/activeadmin/medium_editor_input.js