From 73cfb931cc2a13ec69ee696db20a6a810e406100 Mon Sep 17 00:00:00 2001 From: bnu Date: Mon, 29 Oct 2018 20:56:09 +0900 Subject: [PATCH 01/22] =?UTF-8?q?#2325=20ckeditor=EC=9D=98=20custom=20conf?= =?UTF-8?q?ig=20=EC=82=AC=EC=9A=A9=20=EC=8B=9C=20=EB=B0=B0=ED=8F=AC?= =?UTF-8?q?=EB=B3=B8=EC=9D=98=20removePlugins=20=EC=84=A4=EC=A0=95?= =?UTF-8?q?=EC=9D=84=20=EB=8D=AE=EB=8A=94=20=EB=AC=B8=EC=A0=9C=EB=A1=9C=20?= =?UTF-8?q?#2207=20=EC=9D=B4=EC=8A=88=EC=97=90=EC=84=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=ED=95=9C=20=EB=AC=B8=EC=A0=9C=EB=A5=BC=20=EC=9E=AC?= =?UTF-8?q?=EB=B0=9C=EC=8B=9C=ED=82=A4=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/editor/tpl/js/editor.app.js | 7 +++++++ modules/editor/tpl/js/editor.app.min.js | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/editor/tpl/js/editor.app.js b/modules/editor/tpl/js/editor.app.js index 805807af9e..9ec9d76390 100644 --- a/modules/editor/tpl/js/editor.app.js +++ b/modules/editor/tpl/js/editor.app.js @@ -100,6 +100,13 @@ instance.config.extraPlugins = extraPlugins.join(','); } + if(CKEDITOR.env.iOS) { + var removePlugins = e.editor.config.removePlugins.split(','); + removePlugins.push('enterkey'); + removePlugins = arrayUnique(removePlugins); + instance.config.removePlugins = removePlugins.join(','); + } + if(!opts.enableToolbar) instance.config.toolbar = []; }); diff --git a/modules/editor/tpl/js/editor.app.min.js b/modules/editor/tpl/js/editor.app.min.js index 3132704a9b..69494fbe1a 100644 --- a/modules/editor/tpl/js/editor.app.min.js +++ b/modules/editor/tpl/js/editor.app.min.js @@ -1 +1 @@ -!function(a){"use strict";function b(b){return a.grep(b,function(c,d){return c.length&&a.inArray(c,b)===d})}var c={bodyClass:"xe_content editable",toolbarCanCollapse:!0,toolbarGroups:[{name:"clipboard",groups:["undo","clipboard"]},{name:"editing",groups:["find","selection"]},{name:"links"},{name:"insert"},{name:"tools"},{name:"document",groups:["mode"]},"/",{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},"/",{name:"styles"},{name:"colors"},{name:"xecomponent"},{name:"others"}],allowedContent:!0,removePlugins:"stylescombo,language,bidi,flash,pagebreak",removeButtons:"Save,Preview,Print,Cut,Copy,Paste",uiColor:"#EFF0F0"},d=xe.createApp("XeCkEditor",{ckeconfig:{},editor_sequence:null,init:function(){var a=this;CKEDITOR.env.iOS&&(c.removePlugins+=",enterkey"),CKEDITOR.on("instanceCreated",function(b){a.cast("CKEDITOR_CREATED")}),CKEDITOR.on("ready",function(b){a.cast("CKEDITOR_READY")}),CKEDITOR.on("instanceReady",function(b){a.cast("CKEDITOR_INSTANCE_READY")}),CKEDITOR.on("instanceLoaded",function(b){a.cast("CKEDITOR_LOADED")})},editorInit:function(d,e){var f=this,g=d,h=g.closest("form"),i=h.find(e.content_field),j=g.data();g.data().editorSequence;this.ckeconfig=a.extend({},c,e.ckeconfig||{}),this.editor_sequence=j.editorSequence,h.attr("editor_sequence",j.editorSequence),CKEDITOR.env.mobile&&(CKEDITOR.env.isCompatible=!0);var k=CKEDITOR.appendTo(g[0],{},i.val());k.on("customConfigLoaded",function(d){if(k.config=a.extend({},d.editor.config,f.ckeconfig),a.isFunction(CKEDITOR.editorConfig)){var g={};CKEDITOR.editorConfig(g),a.each(g,function(a,b){k.config[a]=b})}var h=d.editor.config.bodyClass.split(" ");if(h.push(c.bodyClass),h=b(h),k.config.bodyClass=h.join(" "),e.loadXeComponent){var i=d.editor.config.extraPlugins.split(",");i.push("xe_component"),i=b(i),k.config.extraPlugins=i.join(",")}e.enableToolbar||(k.config.toolbar=[])}),g.data("cke_instance",k),window.editorRelKeys[j.editorSequence]={},window.editorRelKeys[j.editorSequence].primary=h.find("[name="+j.editorPrimaryKeyName+"]")[0],window.editorRelKeys[j.editorSequence].content=h.find("[name="+j.editorContentKeyName+"]")[0],window.editorRelKeys[j.editorSequence].func=function(a){return f.getContent.call(f,a)},window.editorRelKeys[j.editorSequence].pasteHTML=function(a){k.insertHtml(a,"html")}},getContent:function(a){var b=this,c=_getCkeInstance(a).getData();return b.cast("GET_CONTENT",[c]),c},getInstance:function(a){return CKEDITOR.instances[a]},API_EDITOR_CREATED:function(){}});a.fn.XeCkEditor=function(a){var b=new d(this.eq(0),a);return b&&(xe.registerApp(b),b.editorInit(this.eq(0),a)),b},window.xe.XeCkEditor=function(){return new d}}(jQuery); \ No newline at end of file +!function(a){"use strict";function b(b){return a.grep(b,function(c,d){return c.length&&a.inArray(c,b)===d})}var c={bodyClass:"xe_content editable",toolbarCanCollapse:!0,toolbarGroups:[{name:"clipboard",groups:["undo","clipboard"]},{name:"editing",groups:["find","selection"]},{name:"links"},{name:"insert"},{name:"tools"},{name:"document",groups:["mode"]},"/",{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},"/",{name:"styles"},{name:"colors"},{name:"xecomponent"},{name:"others"}],allowedContent:!0,removePlugins:"stylescombo,language,bidi,flash,pagebreak",removeButtons:"Save,Preview,Print,Cut,Copy,Paste",uiColor:"#EFF0F0"},d=xe.createApp("XeCkEditor",{ckeconfig:{},editor_sequence:null,init:function(){var a=this;CKEDITOR.env.iOS&&(c.removePlugins+=",enterkey"),CKEDITOR.on("instanceCreated",function(b){a.cast("CKEDITOR_CREATED")}),CKEDITOR.on("ready",function(b){a.cast("CKEDITOR_READY")}),CKEDITOR.on("instanceReady",function(b){a.cast("CKEDITOR_INSTANCE_READY")}),CKEDITOR.on("instanceLoaded",function(b){a.cast("CKEDITOR_LOADED")})},editorInit:function(d,e){var f=this,g=d,h=g.closest("form"),i=h.find(e.content_field),j=g.data();g.data().editorSequence;this.ckeconfig=a.extend({},c,e.ckeconfig||{}),this.editor_sequence=j.editorSequence,h.attr("editor_sequence",j.editorSequence),CKEDITOR.env.mobile&&(CKEDITOR.env.isCompatible=!0);var k=CKEDITOR.appendTo(g[0],{},i.val());k.on("customConfigLoaded",function(d){if(k.config=a.extend({},d.editor.config,f.ckeconfig),a.isFunction(CKEDITOR.editorConfig)){var g={};CKEDITOR.editorConfig(g),a.each(g,function(a,b){k.config[a]=b})}var h=d.editor.config.bodyClass.split(" ");if(h.push(c.bodyClass),h=b(h),k.config.bodyClass=h.join(" "),e.loadXeComponent){var i=d.editor.config.extraPlugins.split(",");i.push("xe_component"),i=b(i),k.config.extraPlugins=i.join(",")}if(CKEDITOR.env.iOS){var j=d.editor.config.removePlugins.split(",");j.push("enterkey"),j=b(j),k.config.removePlugins=j.join(",")}e.enableToolbar||(k.config.toolbar=[])}),g.data("cke_instance",k),window.editorRelKeys[j.editorSequence]={},window.editorRelKeys[j.editorSequence].primary=h.find("[name="+j.editorPrimaryKeyName+"]")[0],window.editorRelKeys[j.editorSequence].content=h.find("[name="+j.editorContentKeyName+"]")[0],window.editorRelKeys[j.editorSequence].func=function(a){return f.getContent.call(f,a)},window.editorRelKeys[j.editorSequence].pasteHTML=function(a){k.insertHtml(a,"html")}},getContent:function(a){var b=this,c=_getCkeInstance(a).getData();return b.cast("GET_CONTENT",[c]),c},getInstance:function(a){return CKEDITOR.instances[a]},API_EDITOR_CREATED:function(){}});a.fn.XeCkEditor=function(a){var b=new d(this.eq(0),a);return b&&(xe.registerApp(b),b.editorInit(this.eq(0),a)),b},window.xe.XeCkEditor=function(){return new d}}(jQuery); \ No newline at end of file From 8868260ce060cd3489fa74655959c7b3fa4b4dd9 Mon Sep 17 00:00:00 2001 From: bnu Date: Tue, 30 Oct 2018 13:23:43 +0900 Subject: [PATCH 02/22] =?UTF-8?q?#2325=20iframe=20=EC=97=90=EB=94=94?= =?UTF-8?q?=ED=84=B0=20=ED=8E=B8=EC=A7=91=20=EC=98=81=EC=97=AD=EC=97=90=20?= =?UTF-8?q?=ED=8F=AC=EC=BB=A4=EC=8A=A4=EB=A5=BC=20=EC=9E=A1=EC=9D=B4=20?= =?UTF-8?q?=EC=96=B4=EB=A0=A4=EC=9A=B4=20=EB=AC=B8=EC=A0=9C=20=EA=B3=A0?= =?UTF-8?q?=EC=B9=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/editor/styles/ckeditor_light/editor.css | 2 ++ modules/editor/styles/ckeditor_recommend/editor.css | 2 ++ modules/editor/styles/default/editor.css | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/editor/styles/ckeditor_light/editor.css b/modules/editor/styles/ckeditor_light/editor.css index 62fff8f8f5..acfabdcd8a 100644 --- a/modules/editor/styles/ckeditor_light/editor.css +++ b/modules/editor/styles/ckeditor_light/editor.css @@ -1,5 +1,7 @@ @charset "utf-8"; /* NAVER (developers@xpressengine.com) */ +html { height: 100%; } +body { min-height: 100%; } .xe_content.editable {color:#000;font-size:13px;font-family:sans-serif;line-height:1.5;word-break:break-all;word-wrap:break-word} .xe_content.editable img{border:0;max-width:100%;} .xe_content.editable blockquote.q1, diff --git a/modules/editor/styles/ckeditor_recommend/editor.css b/modules/editor/styles/ckeditor_recommend/editor.css index bb51a135af..2cb84cbf81 100644 --- a/modules/editor/styles/ckeditor_recommend/editor.css +++ b/modules/editor/styles/ckeditor_recommend/editor.css @@ -1,5 +1,7 @@ @charset "utf-8"; /* NAVER (developers@xpressengine.com) */ +html { height: 100%; } +body { min-height: 100%; } .xe_content.editable {color:#000;font-size:14px;font-family:sans-serif;line-height:1.6;word-break:break-all;word-wrap:break-word} .xe_content.editable img{border:0;max-width:100%;} .xe_content.editable blockquote.q1, diff --git a/modules/editor/styles/default/editor.css b/modules/editor/styles/default/editor.css index b6b7abf7f1..59486b4282 100644 --- a/modules/editor/styles/default/editor.css +++ b/modules/editor/styles/default/editor.css @@ -19,4 +19,4 @@ body{margin:0;padding:0} .xe_content blockquote.q6{border:1px dashed #707070} .xe_content blockquote.q7{border:1px dashed #707070;background:#fbfbfb} .xe_content table .xe_selected_cell{background-color:#d6e9ff} -.xe_content p{margin:0} \ No newline at end of file +.xe_content p{margin:0} From d91cf465e465054622d174228e71fab46befffb6 Mon Sep 17 00:00:00 2001 From: bnu Date: Tue, 30 Oct 2018 13:28:53 +0900 Subject: [PATCH 03/22] =?UTF-8?q?#2325=20config=20=EC=B2=98=EB=A6=AC=20?= =?UTF-8?q?=EC=8B=9C=20=EC=98=A4=EB=A5=98=EA=B0=80=20=EB=B0=9C=EC=83=9D?= =?UTF-8?q?=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8A=94=20=EB=AC=B8=EC=A0=9C?= =?UTF-8?q?=20=EA=B3=A0=EC=B9=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/editor/tpl/js/editor.app.js | 13 +++++++------ modules/editor/tpl/js/editor.app.min.js | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/editor/tpl/js/editor.app.js b/modules/editor/tpl/js/editor.app.js index 9ec9d76390..11953e4931 100644 --- a/modules/editor/tpl/js/editor.app.js +++ b/modules/editor/tpl/js/editor.app.js @@ -87,20 +87,21 @@ }); } - var bodyClass = e.editor.config.bodyClass.split(' '); - bodyClass.push(default_ckeconfig.bodyClass); - bodyClass = arrayUnique(bodyClass); - instance.config.bodyClass = bodyClass.join(' '); + if(e.editor.config.bodyClass) { + var bodyClass = e.editor.config.bodyClass.split(' '); + bodyClass.push(default_ckeconfig.bodyClass); + bodyClass = arrayUnique(bodyClass); + instance.config.bodyClass = bodyClass.join(' '); + } if(opts.loadXeComponent) { var extraPlugins = e.editor.config.extraPlugins.split(','); - extraPlugins.push('xe_component'); extraPlugins = arrayUnique(extraPlugins); instance.config.extraPlugins = extraPlugins.join(','); } - if(CKEDITOR.env.iOS) { + if(CKEDITOR.env.iOS && e.editor.config.removePlugins) { var removePlugins = e.editor.config.removePlugins.split(','); removePlugins.push('enterkey'); removePlugins = arrayUnique(removePlugins); diff --git a/modules/editor/tpl/js/editor.app.min.js b/modules/editor/tpl/js/editor.app.min.js index 69494fbe1a..4daafd3ef5 100644 --- a/modules/editor/tpl/js/editor.app.min.js +++ b/modules/editor/tpl/js/editor.app.min.js @@ -1 +1 @@ -!function(a){"use strict";function b(b){return a.grep(b,function(c,d){return c.length&&a.inArray(c,b)===d})}var c={bodyClass:"xe_content editable",toolbarCanCollapse:!0,toolbarGroups:[{name:"clipboard",groups:["undo","clipboard"]},{name:"editing",groups:["find","selection"]},{name:"links"},{name:"insert"},{name:"tools"},{name:"document",groups:["mode"]},"/",{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},"/",{name:"styles"},{name:"colors"},{name:"xecomponent"},{name:"others"}],allowedContent:!0,removePlugins:"stylescombo,language,bidi,flash,pagebreak",removeButtons:"Save,Preview,Print,Cut,Copy,Paste",uiColor:"#EFF0F0"},d=xe.createApp("XeCkEditor",{ckeconfig:{},editor_sequence:null,init:function(){var a=this;CKEDITOR.env.iOS&&(c.removePlugins+=",enterkey"),CKEDITOR.on("instanceCreated",function(b){a.cast("CKEDITOR_CREATED")}),CKEDITOR.on("ready",function(b){a.cast("CKEDITOR_READY")}),CKEDITOR.on("instanceReady",function(b){a.cast("CKEDITOR_INSTANCE_READY")}),CKEDITOR.on("instanceLoaded",function(b){a.cast("CKEDITOR_LOADED")})},editorInit:function(d,e){var f=this,g=d,h=g.closest("form"),i=h.find(e.content_field),j=g.data();g.data().editorSequence;this.ckeconfig=a.extend({},c,e.ckeconfig||{}),this.editor_sequence=j.editorSequence,h.attr("editor_sequence",j.editorSequence),CKEDITOR.env.mobile&&(CKEDITOR.env.isCompatible=!0);var k=CKEDITOR.appendTo(g[0],{},i.val());k.on("customConfigLoaded",function(d){if(k.config=a.extend({},d.editor.config,f.ckeconfig),a.isFunction(CKEDITOR.editorConfig)){var g={};CKEDITOR.editorConfig(g),a.each(g,function(a,b){k.config[a]=b})}var h=d.editor.config.bodyClass.split(" ");if(h.push(c.bodyClass),h=b(h),k.config.bodyClass=h.join(" "),e.loadXeComponent){var i=d.editor.config.extraPlugins.split(",");i.push("xe_component"),i=b(i),k.config.extraPlugins=i.join(",")}if(CKEDITOR.env.iOS){var j=d.editor.config.removePlugins.split(",");j.push("enterkey"),j=b(j),k.config.removePlugins=j.join(",")}e.enableToolbar||(k.config.toolbar=[])}),g.data("cke_instance",k),window.editorRelKeys[j.editorSequence]={},window.editorRelKeys[j.editorSequence].primary=h.find("[name="+j.editorPrimaryKeyName+"]")[0],window.editorRelKeys[j.editorSequence].content=h.find("[name="+j.editorContentKeyName+"]")[0],window.editorRelKeys[j.editorSequence].func=function(a){return f.getContent.call(f,a)},window.editorRelKeys[j.editorSequence].pasteHTML=function(a){k.insertHtml(a,"html")}},getContent:function(a){var b=this,c=_getCkeInstance(a).getData();return b.cast("GET_CONTENT",[c]),c},getInstance:function(a){return CKEDITOR.instances[a]},API_EDITOR_CREATED:function(){}});a.fn.XeCkEditor=function(a){var b=new d(this.eq(0),a);return b&&(xe.registerApp(b),b.editorInit(this.eq(0),a)),b},window.xe.XeCkEditor=function(){return new d}}(jQuery); \ No newline at end of file +!function(a){"use strict";function b(b){return a.grep(b,function(c,d){return c.length&&a.inArray(c,b)===d})}var c={bodyClass:"xe_content editable",toolbarCanCollapse:!0,toolbarGroups:[{name:"clipboard",groups:["undo","clipboard"]},{name:"editing",groups:["find","selection"]},{name:"links"},{name:"insert"},{name:"tools"},{name:"document",groups:["mode"]},"/",{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},"/",{name:"styles"},{name:"colors"},{name:"xecomponent"},{name:"others"}],allowedContent:!0,removePlugins:"stylescombo,language,bidi,flash,pagebreak",removeButtons:"Save,Preview,Print,Cut,Copy,Paste",uiColor:"#EFF0F0"},d=xe.createApp("XeCkEditor",{ckeconfig:{},editor_sequence:null,init:function(){var a=this;CKEDITOR.env.iOS&&(c.removePlugins+=",enterkey"),CKEDITOR.on("instanceCreated",function(b){a.cast("CKEDITOR_CREATED")}),CKEDITOR.on("ready",function(b){a.cast("CKEDITOR_READY")}),CKEDITOR.on("instanceReady",function(b){a.cast("CKEDITOR_INSTANCE_READY")}),CKEDITOR.on("instanceLoaded",function(b){a.cast("CKEDITOR_LOADED")})},editorInit:function(d,e){var f=this,g=d,h=g.closest("form"),i=h.find(e.content_field),j=g.data();g.data().editorSequence;this.ckeconfig=a.extend({},c,e.ckeconfig||{}),this.editor_sequence=j.editorSequence,h.attr("editor_sequence",j.editorSequence),CKEDITOR.env.mobile&&(CKEDITOR.env.isCompatible=!0);var k=CKEDITOR.appendTo(g[0],{},i.val());k.on("customConfigLoaded",function(d){if(k.config=a.extend({},d.editor.config,f.ckeconfig),a.isFunction(CKEDITOR.editorConfig)){var g={};CKEDITOR.editorConfig(g),a.each(g,function(a,b){k.config[a]=b})}if(d.editor.config.bodyClass){var h=d.editor.config.bodyClass.split(" ");h.push(c.bodyClass),h=b(h),k.config.bodyClass=h.join(" ")}if(e.loadXeComponent){var i=d.editor.config.extraPlugins.split(",");i.push("xe_component"),i=b(i),k.config.extraPlugins=i.join(",")}if(CKEDITOR.env.iOS&&d.editor.config.removePlugins){var j=d.editor.config.removePlugins.split(",");j.push("enterkey"),j=b(j),k.config.removePlugins=j.join(",")}e.enableToolbar||(k.config.toolbar=[])}),g.data("cke_instance",k),window.editorRelKeys[j.editorSequence]={},window.editorRelKeys[j.editorSequence].primary=h.find("[name="+j.editorPrimaryKeyName+"]")[0],window.editorRelKeys[j.editorSequence].content=h.find("[name="+j.editorContentKeyName+"]")[0],window.editorRelKeys[j.editorSequence].func=function(a){return f.getContent.call(f,a)},window.editorRelKeys[j.editorSequence].pasteHTML=function(a){k.insertHtml(a,"html")}},getContent:function(a){var b=this,c=_getCkeInstance(a).getData();return b.cast("GET_CONTENT",[c]),c},getInstance:function(a){return CKEDITOR.instances[a]},API_EDITOR_CREATED:function(){}});a.fn.XeCkEditor=function(a){var b=new d(this.eq(0),a);return b&&(xe.registerApp(b),b.editorInit(this.eq(0),a)),b},window.xe.XeCkEditor=function(){return new d}}(jQuery); \ No newline at end of file From a8fc03f02a34d43164cceadc9551153b730c36f6 Mon Sep 17 00:00:00 2001 From: bnu Date: Tue, 30 Oct 2018 13:38:52 +0900 Subject: [PATCH 04/22] =?UTF-8?q?contentcss=20=ED=8C=8C=EC=9D=BC=EC=9D=98?= =?UTF-8?q?=20=EC=BA=90=EC=8B=9C=20=EA=B0=B1=EC=8B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/editor/skins/ckeditor/editor.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/editor/skins/ckeditor/editor.html b/modules/editor/skins/ckeditor/editor.html index 2b71093ea6..f8e2abcaed 100755 --- a/modules/editor/skins/ckeditor/editor.html +++ b/modules/editor/skins/ckeditor/editor.html @@ -29,6 +29,10 @@ +{@ + $editorContentCssFilemtime = filemtime(_XE_PATH_ . $content_style_path . '/editor.css'); +} +