indvd00m@0: /**
indvd00m@0: * Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
indvd00m@0: * For licensing, see LICENSE.md or http://ckeditor.com/license
indvd00m@0: */
indvd00m@0:
indvd00m@0: // Tool scripts for the sample pages.
indvd00m@0: // This file can be ignored and is not required to make use of CKEditor.
indvd00m@0:
indvd00m@0: ( function() {
indvd00m@0: CKEDITOR.on( 'instanceReady', function( ev ) {
indvd00m@0: // Check for sample compliance.
indvd00m@0: var editor = ev.editor,
indvd00m@0: meta = CKEDITOR.document.$.getElementsByName( 'ckeditor-sample-required-plugins' ),
indvd00m@0: requires = meta.length ? CKEDITOR.dom.element.get( meta[ 0 ] ).getAttribute( 'content' ).split( ',' ) : [],
indvd00m@0: missing = [],
indvd00m@0: i;
indvd00m@0:
indvd00m@0: if ( requires.length ) {
indvd00m@0: for ( i = 0; i < requires.length; i++ ) {
indvd00m@0: if ( !editor.plugins[ requires[ i ] ] )
indvd00m@0: missing.push( '' + requires[ i ] + '' );
indvd00m@0: }
indvd00m@0:
indvd00m@0: if ( missing.length ) {
indvd00m@0: var warn = CKEDITOR.dom.element.createFromHtml(
indvd00m@0: '