Get your own copy
Don't hesitate! Just download and test it all by yourself for free!
// Creates a basic class
tinymce.create('tinymce.somepackage.SomeClass', {
SomeClass : function() {
// Class constructor
},
method : function() {
// Some method
}
});
// Creates a basic subclass class
tinymce.create('tinymce.somepackage.SomeSubClass:tinymce.somepackage.SomeClass', {
SomeSubClass: function() {
// Class constructor
this.parent(); // Call parent constructor
},
method : function() {
// Some method
this.parent(); // Call parent method
},
'static' : {
staticMethod : function() {
// Static method
}
}
});
// Creates a singleton/static class
tinymce.create('static tinymce.somepackage.SomeSingletonClass', {
method : function() {
// Some method
}
});
| Name | Type | Description |
|---|---|---|
| s | String | Class name, inheritage and prefix. |
| p | Object | Collection of methods to add to the class. |
| root | Object | Optional root object defaults to the global window object. |