Sha256: 056535c9b5b8161b1d6ccc6d3371f9938efd11c245a6dbc47f4a8288e3f77f8d

Contents?: true

Size: 504 Bytes

Versions: 5

Compression:

Stored size: 504 Bytes

Contents

Trestle.TinyMCE = {};

// Initialize TinyMCE on targets within initialization scope
Trestle.init(function(e, root) {
  $(root).find('textarea.tinymce').each(function() {
    var id = $(this).attr('id');
    var editor = tinyMCE.get(id);
    if (editor) { editor.remove(); }
  });

  tinyMCE.init(Trestle.TinyMCE.default);
});

// Fix focus issues within Bootstrap modals
$(document).on('focusin', function(e) {
  if ($(e.target).closest(".mce-window").length) {
    e.stopImmediatePropagation();
  }
});

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
trestle-tinymce-0.3.1 app/assets/javascripts/trestle/tinymce.js
trestle-tinymce-0.3.0 app/assets/javascripts/trestle/tinymce.js
trestle-tinymce-0.2.1 app/assets/javascripts/trestle/tinymce.js
trestle-tinymce-0.2.0 app/assets/javascripts/trestle/tinymce.js
trestle-tinymce-0.1.3 app/assets/javascripts/trestle/tinymce.js