X-Git-Url: https://scm.cri.ensmp.fr/git/ckeditor.git/blobdiff_plain/e7f8fb547940c134de50db80ffaf54be1135ca7b..fbd145a2acd338b7bb7d152fa24692d8ff3e6b4c:/Products/ckeditor/skins/ckeditor/samples/sample.js
diff --git a/Products/ckeditor/skins/ckeditor/samples/sample.js b/Products/ckeditor/skins/ckeditor/samples/sample.js
new file mode 100644
index 0000000..b25482d
--- /dev/null
+++ b/Products/ckeditor/skins/ckeditor/samples/sample.js
@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md 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() {
+ CKEDITOR.on( 'instanceReady', function( ev ) {
+ // Check for sample compliance.
+ 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 = [],
+ i;
+
+ if ( requires.length ) {
+ for ( i = 0; i < requires.length; i++ ) {
+ if ( !editor.plugins[ requires[ i ] ] )
+ missing.push( '' + requires[ i ] + '
' );
+ }
+
+ if ( missing.length ) {
+ var warn = CKEDITOR.dom.element.createFromHtml(
+ '