Sha256: 84c4bf241b559edb78a1834cfc25c4c1c77c748397fe6d6b54b9055edbdc1c69

Contents?: true

Size: 1.34 KB

Versions: 5

Compression:

Stored size: 1.34 KB

Contents

//= require plugins/align.min
//= require plugins/code_view.min
//= require plugins/file.min
//= require plugins/fullscreen.min
//= require plugins/image.min
//= require plugins/image_manager.min
//= require plugins/link.min
//= require plugins/lists.min
//= require plugins/paragraph_format.min
//= require plugins/table.min
//= require plugins/video.min

$.extend($.FroalaEditor.DEFAULTS, {
  key: '<%= PushType::WysiwygField::FROALA_KEY %>',
  imageDefaultWidth: 0,
  imageMediaStyles: [ 'original', <%= PushType.config.media_styles.map { |style, _| "'#{ style }'" }.join(', ') %> ],
  imageUploadParam: 'asset[file]',
  imageUploadParams: { froala: true },
  linkEditButtons: ['linkOpen', 'linkStyle', 'linkEdit', 'linkRemove'],
});

_.remove($.FroalaEditor.DEFAULTS['imageEditButtons'],   function(b) { return b === 'imageStyle' });
_.remove($.FroalaEditor.DEFAULTS['linkEditButtons'],    function(b) { return b === 'linkStyle' });
_.remove($.FroalaEditor.DEFAULTS['linkInsertButtons'],  function(b) { return b === 'linkList' });

$.FroalaEditor.COMMANDS['imageManager'].title = 'Browse media';
$.FroalaEditor.COMMANDS['imageManager'].callback = function() {
  this.selection.save();
  this.$current_image = this.image.get();
  this.$box.siblings('.reveal-modal').foundation('reveal', 'open');
}

$.FroalaEditor.DEFAULTS['fileInsertButtons'].push('imageManager');

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
push_type_admin-0.9.0.beta.3 app/assets/javascripts/push_type/wysiwyg_setup.js.erb
push_type_admin-0.9.0.beta.2 app/assets/javascripts/push_type/wysiwyg_setup.js.erb
push_type_admin-0.8.2 app/assets/javascripts/push_type/wysiwyg_setup.js.erb
push_type_admin-0.8.1 app/assets/javascripts/push_type/wysiwyg_setup.js.erb
push_type_admin-0.8.0 app/assets/javascripts/push_type/wysiwyg_setup.js.erb