'use strict';
CKEDITOR.plugins.add( 'ck-simple-box', {
	requires: 'widget',
	icons: 'ck-simple-box',
	init: function( editor ) {
		editor.addContentsCss( this.path + 'contents.css' );
		editor.widgets.add( 'ck-simple-box', {
			allowedContent:
				'div(*);' +
				'h2(*);',

			requiredContent: 'div(ck-simple-box)',
			editables: {
				content: {
					selector: '.ck-simple-box__content'
				}
			},

			template:
				'<div class="ck-simple-box">' +
					'<div class="ck-simple-box__content"><p>Saturs</p></div>'+
				'</div>',

			button: 'Simple box',
			upcast: function( element ) {
				return element.name == 'div' && element.hasClass( 'ck-simple-box' );
			}
		} );
	}
} );