Sha256: 3ff96a4245d5cd120d45903d14f090c57ab5ee3cc109438060b37f00529b5fdf

Contents?: true

Size: 1.11 KB

Versions: 8

Compression:

Stored size: 1.11 KB

Contents

/**
 * Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.html or http://ckeditor.com/license
 */

// Tool scripts for the sample pages.
// This file can be ignored and is not required to make use of CKEditor.

(function() {
	// Check for sample compliance.
	CKEDITOR.on( 'instanceReady', function( ev ) {
		var editor = ev.editor,
			meta = CKEDITOR.document.$.getElementsByName( 'ckeditor-sample-required-plugins' ),
			requires = meta.length ? CKEDITOR.dom.element.get( meta[ 0 ] ).getAttribute( 'content' ).split( ',' ) : [],
			missing = [];

		if ( requires.length ) {
			for ( var i = 0; i < requires.length; i++ ) {
				if ( !editor.plugins[ requires[ i ] ] )
					missing.push( '<code>' + requires[ i ] + '</code>' );
			}

			if ( missing.length ) {
				var warn = CKEDITOR.dom.element.createFromHtml(
					'<div class="warning">' +
						'<span>To fully experience this demo, the ' + missing.join( ', ' ) + ' plugin' + ( missing.length > 1 ? 's are' : ' is' ) + ' required.</span>' +
					'</div>'
				);
				warn.insertBefore( editor.container );
			}
		}
	});
})();

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cg_app_base-1.1.1 app/assets/javascripts/flatty/plugins/ckeditor/samples/sample.js
cg_app_base-1.0.78 app/assets/javascripts/flatty/plugins/ckeditor/samples/sample.js
cg_app_base-1.0.62 app/assets/javascripts/flatty/plugins/ckeditor/samples/sample.js
cg_app_base-1.0.56 app/assets/javascripts/flatty/plugins/ckeditor/samples/sample.js
cg_app_base-1.0.55 app/assets/javascripts/flatty/plugins/ckeditor/samples/sample.js
cg_app_base-1.0.54 app/assets/javascripts/flatty/plugins/ckeditor/samples/sample.js
cg_app_base-1.0.52 app/assets/javascripts/flatty/plugins/ckeditor/samples/sample.js
cg_app_base-1.0.51 app/assets/javascripts/flatty/plugins/ckeditor/samples/sample.js