Sha256: dc1824d6331794d9785273b469d3ebe0d1ed72ea440f08dbf7c9897f4e054424
Contents?: true
Size: 1.08 KB
Versions: 6
Compression:
Stored size: 1.08 KB
Contents
/** * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview Save plugin. */ (function() { var saveCmd = { exec: function( editor ) { if ( editor.element.getAttribute('data-id') != null ) { $.ajax({ url: '/admin/sections/' + editor.element.getAttribute('data-id') + '.js', type: 'PUT', data: { 'section': { 'body': editor.getData() } } }); } else { alert('Section id not specified!'); } } }; var pluginName = 'inlinesave'; // Register a plugin named "save". CKEDITOR.plugins.add( pluginName, { icons: 'save', // %REMOVE_LINE_CORE% init: function( editor ) { editor.addCommand( pluginName, saveCmd ); editor.ui.addButton && editor.ui.addButton( 'Save', { label: 'Save', command: pluginName, toolbar: 'document' }); } }); })();
Version data entries
6 entries across 6 versions & 1 rubygems