Sha256: 7fcf1ede2e07fadbd28577b4131fdb46cb766870e4fcd6d8add9177f3a48dc51

Contents?: true

Size: 602 Bytes

Versions: 1

Compression:

Stored size: 602 Bytes

Contents

(function () {
  'use strict'

  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.8 app/assets/javascripts/activeadmin/trumbowyg_input.js