From dbb6e4b7f71291578aa4d658612c39e5962f7b8a Mon Sep 17 00:00:00 2001 From: whitedot Date: Thu, 10 Jan 2013 15:24:10 +0900 Subject: [PATCH] =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90:=20ckeditor?= =?UTF-8?q?=EB=A1=9C=20=EC=97=85=EB=A1=9C=EB=93=9C=ED=95=9C=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20style=20=EC=A0=9C=EA=B1=B0=ED=95=98?= =?UTF-8?q?=EA=B3=A0=20width,=20height=EB=A1=9C=20=EB=8C=80=EC=B2=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/def.css | 10 ++++---- plugin/ckeditor/ckeditor.js | 45 +++++++++++++++++++++++++++++++++++- skin/board/neo/view.skin.php | 6 ++--- 3 files changed, 52 insertions(+), 9 deletions(-) diff --git a/css/def.css b/css/def.css index b91bec865..cded3a343 100644 --- a/css/def.css +++ b/css/def.css @@ -39,7 +39,7 @@ fieldset button:focus, .fieldset_submit:focus {padding:0 15px;height:24px;border:0;background:#555;color:#fff;font-size:0.75em;line-height:1.9em;vertical-align:middle} /* 이미지 등비율 리사이징 */ -.img_fix {float:left;width:100%;height:auto} +.img_fix {float:left;margin-bottom:20px;width:100%;height:auto} /* 그누보드4s 설치 완료 메세지 */ #install_done {position:absolute;margin-top:-30px;width:100%;height:580px;background:#e7ebee} @@ -302,10 +302,10 @@ a {color:#000;text-decoration:none} #bo_v_top ul {padding:0;list-style:none} .bo_v_com {float:right} .bo_v_com li {float:left;margin-left:5px} -#bo_v_article {padding:0 10px;zoom:1} -#bo_v_article:after {display:block;visibility:hidden;clear:both;content:""} -#bo_v_article h1 {margin:0;padding:0;height:0;overflow:hidden} -#bo_v_article p {padding:0 0 10px;font-size:0.875em} +#bo_v_atc {padding:0 10px;zoom:1} +#bo_v_atc:after {display:block;visibility:hidden;clear:both;content:""} +#bo_v_atc h1 {margin:0;padding:0;height:0;overflow:hidden} +#bo_v_atc p {padding:0 0 10px;font-size:0.875em} #bo_v_file {background:#555;font-size:0.75em} #bo_v_file h2 {margin:0;padding:0;height:0;overflow:hidden} #bo_v_file ul {margin:0;padding:0;list-style:none} diff --git a/plugin/ckeditor/ckeditor.js b/plugin/ckeditor/ckeditor.js index 90204316d..b8f3d548c 100644 --- a/plugin/ckeditor/ckeditor.js +++ b/plugin/ckeditor/ckeditor.js @@ -844,4 +844,47 @@ l;if(!(a in m||this.typing)||!c&&!e&&(b||g)||c&&!d){var f=new i(this.editor),h=t this.typesCount=0},fireChange:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(a,c,b){if(this.locked)return!1;var d=this.snapshots;c||(c=new i(this.editor));if(!1===c.contents||this.currentImage&&c.equals(this.currentImage,a))return!1;d.splice(this.index+1,d.length-this.index-1);d.length==this.limit&&d.shift();this.index=d.push(c)-1;this.currentImage=c;!1!==b&&this.fireChange();return!0},restoreImage:function(a){var c= this.editor,b;a.bookmarks&&(c.focus(),b=c.getSelection());this.locked=1;this.editor.loadSnapshot(a.contents);a.bookmarks?b.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(c=this.editor.document.getBody().$.createTextRange(),c.collapse(!0),c.select());this.locked=0;this.index=a.index;this.update();this.fireChange()},getNextImage:function(a){var c=this.snapshots,b=this.currentImage,d;if(b)if(a)for(d=this.index-1;0<=d;d--){if(a=c[d],!b.equals(a,!0))return a.index=d,a}else for(d=this.index+1;d. +ev.editor.dataProcessor.htmlFilter.addRules( + { + elements: + { + $: function (element) { + // Output dimensions of images as width and height + if (element.name == 'img') { + var style = element.attributes.style; + + if (style) { + // Get the width from the style. + var match = /(?:^|\s)width\s*:\s*(\d+)px/i.exec(style), + width = match && match[1]; + + // Get the height from the style. + match = /(?:^|\s)height\s*:\s*(\d+)px/i.exec(style); + var height = match && match[1]; + + if (width) { + element.attributes.style = element.attributes.style.replace(/(?:^|\s)width\s*:\s*(\d+)px;?/i, ''); + element.attributes.width = width; + } + + if (height) { + element.attributes.style = element.attributes.style.replace(/(?:^|\s)height\s*:\s*(\d+)px;?/i, ''); + element.attributes.height = height; + } + } + } + + + + if (!element.attributes.style) + delete element.attributes.style; + + return element; + } + } + }); +}); \ No newline at end of file diff --git a/skin/board/neo/view.skin.php b/skin/board/neo/view.skin.php index 954fc4147..c9e02965f 100644 --- a/skin/board/neo/view.skin.php +++ b/skin/board/neo/view.skin.php @@ -98,7 +98,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?> -
+

본문

@@ -160,10 +160,10 @@ function file_download(link, file) {