1 |
85ad3d82
|
Assos Assos
|
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
|
9 |
|
|
(function() {
|
10 |
|
|
|
11 |
|
|
CKEDITOR.on( 'instanceReady', function( ev ) {
|
12 |
|
|
var editor = ev.editor,
|
13 |
|
|
meta = CKEDITOR.document.$.getElementsByName( 'ckeditor-sample-required-plugins' ),
|
14 |
|
|
requires = meta.length ? CKEDITOR.dom.element.get( meta[ 0 ] ).getAttribute( 'content' ).split( ',' ) : [],
|
15 |
|
|
missing = [];
|
16 |
|
|
|
17 |
|
|
if ( requires.length ) {
|
18 |
|
|
for ( var i = 0; i < requires.length; i++ ) {
|
19 |
|
|
if ( !editor.plugins[ requires[ i ] ] )
|
20 |
|
|
missing.push( '<code>' + requires[ i ] + '</code>' );
|
21 |
|
|
}
|
22 |
|
|
|
23 |
|
|
if ( missing.length ) {
|
24 |
|
|
var warn = CKEDITOR.dom.element.createFromHtml(
|
25 |
|
|
'<div class="warning">' +
|
26 |
|
|
'<span>To fully experience this demo, the ' + missing.join( ', ' ) + ' plugin' + ( missing.length > 1 ? 's are' : ' is' ) + ' required.</span>' +
|
27 |
|
|
'</div>'
|
28 |
|
|
);
|
29 |
|
|
warn.insertBefore( editor.container );
|
30 |
|
|
}
|
31 |
|
|
}
|
32 |
|
|
});
|
33 |
|
|
})();
|