From e1c6be4bf3f84914c3e1a110afddb38985b744c7 Mon Sep 17 00:00:00 2001 From: bnu Date: Fri, 6 Mar 2015 19:47:31 +0900 Subject: [PATCH] =?UTF-8?q?#1087=20ckeditor=20=EC=A0=95=EB=A6=AC=20-=20xeE?= =?UTF-8?q?ditor=20plugin=20=EC=A0=9C=EA=B1=B0=20=EB=B0=8F=20app=EB=A1=9C?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD=20-=20ckeditor=20config=EB=A5=BC=20app=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=EB=A1=9C=20=EC=9D=B4=EB=8F=99=20-=20?= =?UTF-8?q?=ED=88=B4=EB=B0=94=20=EC=A0=91=EA=B8=B0=20=EC=84=A4=EC=A0=95?= =?UTF-8?q?=EC=9D=B4=20=EC=9E=98=EB=AA=BB=20=EB=B0=98=EC=98=81=EB=90=9C=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xe_component/icons/xe_component.png | Bin 3634 -> 0 bytes common/js/plugins/ckeditor/plugin.load | 1 - common/js/plugins/ckeditor/xeEditor.plugin.js | 76 -------------- modules/editor/editor.model.php | 3 + modules/editor/skins/ckeditor/css/default.css | 6 ++ modules/editor/skins/ckeditor/editor.html | 44 ++------ modules/editor/tpl/js/editor.app.js | 98 ++++++++++++++++-- 7 files changed, 109 insertions(+), 119 deletions(-) delete mode 100755 common/js/plugins/ckeditor/ckeditor/plugins/xe_component/icons/xe_component.png delete mode 100644 common/js/plugins/ckeditor/xeEditor.plugin.js diff --git a/common/js/plugins/ckeditor/ckeditor/plugins/xe_component/icons/xe_component.png b/common/js/plugins/ckeditor/ckeditor/plugins/xe_component/icons/xe_component.png deleted file mode 100755 index 46a7abf9f82ffe51f56d15411fef40ea683eb80b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3634 zcmeH}=*f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e0JNzD;vYs>3ZaX2kaNY5M>A za)mk!mY`Oow*LEd-x{C4PUyxCo_qy=n_6YzXQV*a7M+JI?Rt4ww zuJ$eFBN`JkyUSr0`nbPnU(2i6h8i8i2fY_|Vy3c?M`LNIY*a*~u~fr=%@j=$zb!@rr?8$lkaZOuG&@BlzD&a>(+ugjDrv6 zAgsM9+!MdUQKW=jI%yC6mzgj#U8JnO)P5Z1hwsIot}rh}1`1tbhg;`^g$`=l%-ft! zwDz^+9;f{bevj zPUil}z4QIf;Kg9B!*?sR<{Qtrp9>SbetkT(8ZST3V#~@R5EJDcU%1Ih;I98oZZ`u< zQvkvQ0EmhO;1}WAcK~=I4ZyB504jL^u=u@n>eT~)2;4P+>t63bAdu_+|N1|H|3L!J z*2uc9W8Vm}G_xXr&1Pw%>j`G4qYV#Ps7Y6*>5!)C9uOoD8dN@G#w)ej4P_<7wjG`+ zst}WtX#F1IOyVDD5FGdxPrQ~;&rDHCq>-%Ib|rfN0bD=HWV?%g-1)=QP}fYS4(c59 EU%wYh!vFvP diff --git a/common/js/plugins/ckeditor/plugin.load b/common/js/plugins/ckeditor/plugin.load index c0bdf24b6..c7daa20d2 100644 --- a/common/js/plugins/ckeditor/plugin.load +++ b/common/js/plugins/ckeditor/plugin.load @@ -1,2 +1 @@ ckeditor/ckeditor.js -xeEditor.plugin.js diff --git a/common/js/plugins/ckeditor/xeEditor.plugin.js b/common/js/plugins/ckeditor/xeEditor.plugin.js deleted file mode 100644 index d402c202f..000000000 --- a/common/js/plugins/ckeditor/xeEditor.plugin.js +++ /dev/null @@ -1,76 +0,0 @@ -(function($){ - "use strict"; - var App = window.xe.getApp('xeEditorApp')[0]; - var CK = window.CKEDITOR; - - var xeCKEditor = App.createPlugin("CKEditor", { - instance_prefix : 'ckeditor_instance_', - - init : function() { - var self = this; - CKEDITOR.on('instanceCreated', function(evt){ - self.cast('CKEDITOR_CREATED'); - }); - - CKEDITOR.on('ready', function(evt){ - self.cast('CKEDITOR_READY'); - }); - - CKEDITOR.on('instanceReady', function(evt){ - self.cast('CKEDITOR_INSTANCE_READY'); - }); - - CKEDITOR.on('instanceLoaded', function(evt){ - self.cast('CKEDITOR_LOADED'); - }); - }, - editorInit : function(sequence, obj) { - var self = this; - var $editor_area = jQuery("#ckeditor_instance_"+sequence); - var $form = $editor_area.closest('form'); - var $contentField = $('input[name=' + obj.content_key + ']'); - var ckconfig = obj.ckconfig || {}; - ckconfig.xe_editor_sequence = sequence; - - $form.attr('editor_sequence', sequence); - - var insance = CKEDITOR.appendTo(this.instance_prefix + sequence, ckconfig, obj.content); - $editor_area.data('cke_instance', insance); - - insance.on('change', function(e){ - if($contentField.length){ - $contentField.val(e.editor.getData()); - } - }); - this.sequence = sequence; - window.editorRelKeys[sequence] = {}; - window.editorRelKeys[sequence].primary = $form.find('[name='+obj.primary_key+']')[0]; - window.editorRelKeys[sequence].content = $form.find('[name='+obj.content_key+']')[0]; - window.editorRelKeys[sequence].func = function(seq) { - return self.getContent.call(self, seq); - }; - window.editorRelKeys[sequence].pasteHTML = function(text){ - insance.insertHtml(text, 'html'); - }; - }, - getContent : function(seq) { - var self = this; - var content = _getCkeInstance(seq).getData(); - self.cast('GET_CONTENT', [content]); - - return content; - }, - API_ONREADY : function() { - }, - API_GET_CONTENT: function() { - }, - getInstance : function(name) { - return CKEDITOR.instances[name]; - }, - autosave: function(seq) { - - } - }); - - App.registerPlugin(new xeCKEditor()); -})(jQuery); diff --git a/modules/editor/editor.model.php b/modules/editor/editor.model.php index 4aefa2a1e..557d6fa02 100644 --- a/modules/editor/editor.model.php +++ b/modules/editor/editor.model.php @@ -208,6 +208,7 @@ class editorModel extends editor if(!$colorset) $colorset = 'moono'; Context::set('colorset', $colorset); Context::set('skin', $skin); + Context::set('module_type', $option->module_type); if($skin=='dreditor') { @@ -332,6 +333,7 @@ class editorModel extends editor $editor_config = $this->getEditorConfig($module_srl); $config = new stdClass(); + $config->module_type = $type; // Configurations listed according to a type if($type == 'document') @@ -374,6 +376,7 @@ class editorModel extends editor } // Pre-set option variables of editor $option = new stdClass(); + $option->module_type = $config->module_type; $option->skin = $config->editor_skin; $option->content_style = $config->content_style; $option->content_font = $config->content_font; diff --git a/modules/editor/skins/ckeditor/css/default.css b/modules/editor/skins/ckeditor/css/default.css index e69de29bb..b0620a956 100755 --- a/modules/editor/skins/ckeditor/css/default.css +++ b/modules/editor/skins/ckeditor/css/default.css @@ -0,0 +1,6 @@ +.cke_button__xe_component_label { + display: inline !important; +} +.cke_button__xe_component_icon { + display: none !important; +} diff --git a/modules/editor/skins/ckeditor/editor.html b/modules/editor/skins/ckeditor/editor.html index ee4294ed9..580902cd5 100755 --- a/modules/editor/skins/ckeditor/editor.html +++ b/modules/editor/skins/ckeditor/editor.html @@ -22,7 +22,7 @@ {@ $css_content .= chr(125);} -
+
@@ -58,37 +58,14 @@ +