mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
#1087 에디터 API를 위한 JAF App 'xeEditorApp' 추가
This commit is contained in:
parent
78a0a069b5
commit
d9c4e416d4
1 changed files with 35 additions and 0 deletions
35
modules/editor/tpl/js/editor.app.js
Normal file
35
modules/editor/tpl/js/editor.app.js
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
(function($){
|
||||
var xeEditorApp = xe.createApp('xeEditorApp', {
|
||||
init : function() {
|
||||
console.log('INIT @ xeEditorApp')
|
||||
},
|
||||
API_ONREADY : function() {
|
||||
console.log('ONREADY @ xeEditorApp');
|
||||
},
|
||||
getContent : function(seq) {
|
||||
this.cast('GET_CONTENT');
|
||||
},
|
||||
API_EDITOR_CREATED : function(){
|
||||
console.log('APP @ API_EDITOR_CREATED');
|
||||
},
|
||||
});
|
||||
|
||||
// Shortcut function in jQuery
|
||||
$.fn.xeEditorApp = function(opts) {
|
||||
var u = new xeEditorApp(this.eq(0), opts);
|
||||
if(u) xe.registerApp(u);
|
||||
|
||||
return u;
|
||||
};
|
||||
|
||||
// Shortcut function in XE
|
||||
window.xe.createXeEditor = function() {
|
||||
var u = new xeEditorApp();
|
||||
// if(u) xe.registerApp(u);
|
||||
|
||||
return u;
|
||||
};
|
||||
var u = new xeEditorApp();
|
||||
xe.registerApp(u);
|
||||
|
||||
})(jQuery);
|
||||
Loading…
Add table
Add a link
Reference in a new issue