Sha256: 563fb1d70d4fac973a663420f04c9256b92c1ea9d3c6d258b7dcaf25b7d886b3

Contents?: true

Size: 453 Bytes

Versions: 1

Compression:

Stored size: 453 Bytes

Contents

function initFroalaEditors() {
  $('.froala-editor').each(function () {
    if (!$(this).hasClass('froala-editor--active')) {
      var options = {};
      options = $.extend({}, options, $(this).data('options'));
      $(this).froalaEditor(options);
      $(this).addClass('froala-editor--active');
    }
  });
}

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activeadmin_froala_editor-0.1.3 app/assets/javascripts/activeadmin/froala_editor_input.js