Sha256: 4ca76fdf1edf46abcad2e079aa41ad8cdd771b7cd7d4e3d8acc6a16decf232fe
Contents?: true
Size: 1.2 KB
Versions: 3
Compression:
Stored size: 1.2 KB
Contents
// Place all the behaviors and hooks related to the matching controller here. // All this logic will automatically be available in application.js. import Spotlight from 'spotlight' export default class { connect(){ SirTrevor.setDefaults({ iconUrl: Spotlight.sirTrevorIcon, uploadUrl: $('[data-attachment-endpoint]').data('attachment-endpoint'), ajaxOptions: { headers: { 'X-CSRF-Token': Spotlight.csrfToken() || '' }, credentials: 'same-origin' } }); SirTrevor.Blocks.Heading.prototype.toolbarEnabled = true; SirTrevor.Blocks.Quote.prototype.toolbarEnabled = true; SirTrevor.Blocks.Text.prototype.toolbarEnabled = true; var instance = $('.js-st-instance').first(); if (instance.length) { var editor = new SirTrevor.Editor({ el: instance[0], blockTypes: instance.data('blockTypes'), defaultType:["Text"], onEditorRender: function() { $.SerializedForm(); }, blockTypeLimits: { "SearchResults": 1 } }); editor.blockControls = Spotlight.BlockControls.create(editor); new Spotlight.BlockLimits(editor).enforceLimits(editor); } } }
Version data entries
3 entries across 3 versions & 1 rubygems