From d9c4e416d473bad0063f23068d91ac7eea91d5be Mon Sep 17 00:00:00 2001 From: bnu Date: Tue, 24 Feb 2015 18:44:10 +0900 Subject: [PATCH] =?UTF-8?q?#1087=20=EC=97=90=EB=94=94=ED=84=B0=20API?= =?UTF-8?q?=EB=A5=BC=20=EC=9C=84=ED=95=9C=20JAF=20App=20'xeEditorApp'=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/editor/tpl/js/editor.app.js | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 modules/editor/tpl/js/editor.app.js diff --git a/modules/editor/tpl/js/editor.app.js b/modules/editor/tpl/js/editor.app.js new file mode 100644 index 000000000..32a9889b6 --- /dev/null +++ b/modules/editor/tpl/js/editor.app.js @@ -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);