Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 519633084b64f70312d1ee1e7e367688af70dbb9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(function(){
  'use strict';

  var createStubs = function( object, names ) {
    var fun = function(){ return false; };
    for( var i = 0; i < names.length; i++ ) {
      object[ names[ i ] ] = fun;
    }
  };

  window.CKEDITOR = {
    editor : function(){},
    appendTo : function( element ) {
      return new CKEDITOR.editor( element );
    }
  };

  createStubs(
    CKEDITOR.editor.prototype,
    [ "on", "resize", "setData", "getData", "checkDirty", "resetDirty", "destroy" ]
  );

  CKEDITOR.editor.prototype.document = {
    "getBody" : function() {
      return this.body;
    },
    "body" : {
      setStyle : function(){}
    }
  };

}());

Back to the top