[처음 FCKEditor를 적용하면서 정리를 해봤는데..많은 부분이 부족한듯 --;; 시간나면 다시한번 정리를 하겠습니다.]
- FCKEditor 이미지 업로드 및 삽입방법
- 기존내용 수정 및 추가
FCKEditor압축파일을 다운받은후 푼다.
sample파일 : /FCKeditor/_sample 폴더 밑 sample파일
test파일 : /FCKeditor/_testcases 폴더 및 html 파일
editor페이지: /FCKeditor/editor/fckeditor.html 과 fckeditor.original.html파일
1. fckeditor폴더를 서비스 root폴더에 푼다.
2. 에디터가 들어가는 페이지에 인클루드한다.
3. 편집기가 들어가는 위치에 다음의 코드를 삽입한다.
<%
Dim
oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath
= "/FCKeditor/"
oFCKeditor.Create "FCKeditor1"
%>
◆ Enter키 사용시 fckconfig.js 중에 FCKConfig.UseBROnCarriageReturn = true ; 으로 변경
태그에서
태그 적용방법
◆ 설정사항
설정파일 - fckeditor.asp
sBasePath = "/FCKeditor/"
sWidth = "100%" '너비
sHeight = "400" '높이
sToolbarSet = "Default" '툴바 스타일
sValue = ""
◆ FCKeditor 제공하는 기본 언어/메뉴/스킨 변경
/FCKeditor/_sample폴더 밑에 sample파일 참조
<%
Dim
sBasePath
sBasePath = "/FCKeditor/"
Dim
oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath
= sBasePath
%>
1. 언어변경 : sample2.asp 참조
oFCKeditor.Config("DefaultLanguage")
2. 메뉴변경 : sample3.asp 참조
oFCKeditor.ToolbarSet = Request.QueryString("Toolbar")
value = Default , Basic
3. 스킨변경 : sample4.asp 참조
oFCKeditor.Config("SkinPath") = sBasePath + "editor/skins/" & Request.QueryString("Skin") + "/"
value = default.office2003,silver
◆ 도구모음 중 불필요한 도구 제거하기
/FCKeditor/fckconfig.js 파일에서
FCKConfig.ToolbarSets["Default"] 항목의 값중에 필요없는 도구를 제거한다.
◆ 아이콘 경로가 현재위치(/FCKeditor)부터 적용되어 있는걸 URL을 포함시키는 방법.
/FCKeditor/fckconfig.js 파일에서
[아이콘 경로]
FCKConfig.site_root_url = "url입력";
FCKConfig.SmileyPath = FCKConfig.site_root_url + FCKConfig.BasePath + 'images/smiley/msn/' ;
이미지 및 플래시 경로 변경도 비슷할듯 테스트 해봐야...
◆ FCKeditor 값 전송시 처리방법
replace함수를 써서 " -> ' 으로 변환한다.
content = replace(Request.Form("FCKeditor1"),"""","'")
ps) FCKeditor는 입력값이 html변환시 내용중 "은 "로 변환되어 전송받은 페이지에서 정상적으로 보여지나, 입력값중에 태그에 의해 자동생기는 "은 전송받은 페이지에서 그대로 넘겨받아 해당페이지의 태그 속성값과 충돌이 생겨 깨진다. 이를 위해 넘기는 "은 '으로 변환한다.
◆ 전송받은 페이지에서 한글깨짐 처리방법
<%@ CodePage='949' Language="VBScript"%> 삽입