3. ckeditor 글꼴 및 언어 설정



config.language와 CKEDITOR.config.font_names를 아래와 같이 지정한다.

그 외의 설정은 나중에 설명하겠음.


CKEDITOR.editorConfig = function( config ) {

config.language = 'ko'; // 언어설정 툴바 메뉴가 한글로 출력됨(대소문자 구별)

config.font_names = '맑은 고딕; 돋움; 바탕; 돋음; 궁서; Nanum Gothic Coding; Quattrocento Sans;' + CKEDITOR.config.font_names; //기본 글꼴에 +기호로 한글 글꼴을 추가 한다.


config.filebrowserUploadUrl='/userfile/upload.php';//화일 업로드용 코드(이하는 나중에 설명 함)

config.uiColor = '#EEEEEE'; //ui 색상

config.height = '300px'; //Editor 높이

config.width = '777px'; //Editor 넓이

//입력창의 크기는 <textarea>에 크기를 지정하면 거기에 따른다. 따로 ckeditor설정에서 안 해도 됨.

config.contentsCss = ['/css/style.css'],['/css/main.css'];

//홈페이지에서 사용하는 CSS 파일 인클루드

config.font_defaultLabel = 'Gulim';

config.fontSize_defaultLabel = '12px';

config.fontSize_sizes='8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;';

config.enterMode =CKEDITOR.ENTER_BR; //엔터키 입력시 br 태그 변경

config.shiftEnterMode = CKEDITOR.ENTER_P; //엔터키 입력시 p 태그로 변경

config.startupFocus = true; // 시작시 포커스 설정

config.allowedContent = true; // 기본적인 html이 필터링으로 지워지는데 필터링을 하지 않는다.

config.filebrowserImageUploadUrl = '/include/editor/upload/upload.asp';

//이미지 업로드 경로 (설정하면 업로드 플러그인에 탭이 생김)

config.filebrowserFlashUploadUrl = '/include/editor/upload/upload.asp;

//플래쉬 업로드 경로 (설정하면 업로드 플러그인에 탭이생김)

config.toolbarCanCollapse = true; //툴바가 접히는 기능을 넣을때 사용합니다.

config.docType = "<!DOCTYPE html>"; //문서타입 설정

config.extraAllowedContent = 'video[*]{*};source[*]{*}';

//video , embed 등 막힌 태그를 허용하게 하는 설정.

(이 설정은 콜백 파일에서 최종으로 넘겨야하는 인자가 있다.

첫 번째 인수 : 넘어오는 값 그대로 리턴

두 번째 인수 : 보여질 이미지 주소

세 번째 인수 : 완료 alert 문구

window.parent.CKEDITOR.tools.callFunction(, '','업로드 완료 ');

이렇게 처리해 줘야 함.)

config.toolbarGroups = [

: 

Posted by star story :

Snippet :: Code View :: "+location.href+'
'+b+"

");top.consoleRef.document.close()}$(".snippet-container").each(function(b){$(this).find("a.snippet-text").click(function(){var d=$(this).parents(".snippet-wrap").find(".snippet-formatted");var c=$(this).parents(".snippet-wrap").find(".snippet-textonly");d.toggle();c.toggle();if(c.is(":visible")){$(this).html("html")}else{$(this).html("text")}return false});$(this).find("a.snippet-window").click(function(){var c=$(this).parents(".snippet-wrap").find(".snippet-textonly").html();a(c);$(this).blur();return false})});$(".snippet-toggle").each(function(b){$(this).click(function(){$(this).parents(".snippet-container").find(".snippet-wrap").toggle()})})});