Sha256: 704a182f14ebc8b675092b9681dd348b5d87b6b805394dfa2c147e0561bd0f25

Contents?: true

Size: 528 Bytes

Versions: 2

Compression:

Stored size: 528 Bytes

Contents

function initTrumbowygEditors() {
  $('.trumbowyg-textarea').each(function () {
    if (!$(this).hasClass('trumbowyg-textarea--active')) {
      var options = {
        svgPath: '/assets/trumbowyg/icons.svg'
      };
      options = $.extend({}, options, $(this).data('options'));
      $(this).trumbowyg(options);
      $(this).addClass('trumbowyg-textarea--active');
    }
  });
}

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activeadmin_trumbowyg-0.2.4 app/assets/javascripts/activeadmin/trumbowyg_input.js
activeadmin_trumbowyg-0.2.0 app/assets/javascripts/activeadmin/trumbowyg_input.js