Sha256: e41625d43193883cd3846e680ac38339d53569253535ca98c9861a715cefd571

Contents?: true

Size: 586 Bytes

Versions: 1

Compression:

Stored size: 586 Bytes

Contents

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

  $(document).ready(() => {
    initTrumbowygEditors()
  })

  $(document).on('has_many_add:after', '.has_many_container', () => {
    initTrumbowygEditors()
  })
})()

Version data entries

1 entries across 1 versions & 1 rubygems

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