오늘 온라인 편집자는 ASP 환경에서 업로드되었지만 유효하지 않았습니다. 나는이 소개를 찾기 전에 오랫동안 검색했다. Fckeditor는 다양한 서버 스크립팅 언어를 사용하여 많은 파일을 사용하여 필요에 따라 간소화해야합니다.
ASP 시스템의 경우 :
fckeditor 루트 디렉토리, fckeditor.asp, fckconfig.js, fckeditor.js, fckpackager.xml, fckstyles.xml,
fcktemplates.xml 파일 및 편집기 디렉토리. 샘플 디렉토리 _samples를 삭제하십시오.
ASP 디렉토리 만 Fckeditor/Editor/Filemanager/Connectors Directory에서 유지되고 기타 디렉토리 및 파일이 삭제됩니다.
(2) 파일을 업로드하는 데 사용되는 스크립트 프로그램 (언어)을 수정하십시오.
기본 Fckeditor 파일 업로드 프로그램은 ASP 시스템에서 사용되면 수정할 필요가 없습니다.
PHP 시스템에서 사용되는 경우 다음 수정을 만들고 fckconfig.js를 열어야합니다.
켜기 :
var _filebrowserlang ge = asp
var _quickuploadlang ge = asp
변경 :
var _filebrowserlang ge = php
var _quickuploadlang ge = php
(3) 파일 업로드를 켜고 파일 업로드 디렉토리를 수정합니다.
ASP 시스템의 경우 :
fckeditor/editor/filemanager/connectors/asp/config.asp를 엽니 다
파일 업로드 활성화 :
켜기 :
configisEnabled = false
변경 :
configisEnabled = tr
업로드 및 스토리지 디렉토리 설정 :
켜기 :
configuserFilespath =/admin/uppic/
변경 :
configuserFilespath = 사용자 정의 경로
PHP 시스템의 경우 :
fckeditor/editor/filemanager/브라우저/기본/Connectors/php/config.php 열기
파일 업로드 활성화 :
켜기 :
$ config [enabled] = false
변경 :
$ config [enabled] = tr
업로드 및 스토리지 디렉토리 설정 :
켜기 :
$ config [userFileSpath] = /userFiles /
변경 :
$ config [userFileSpath] = 사용자 정의 경로
(4) 업로드 된 파일 이름 지정 방법을 수정하십시오.
fckeditor는 파일을 업로드하고 파일 이름은 원본 파일 이름을 사용하려면 다음과 같이 수정할 수 있습니다.
정사각형:
ASP 시스템의 경우 :
fckeditor/sample/edit/edit/edit/filemanager/connectors/asp/commands.asp를 엽니 다
켜기 :
sfilename = sanitizefilename (sfilename)
이 문장을 사용자 정의 파일 명명 형식으로 변경하십시오.
희미한 rndstr
무작위 화
RNDSTR = CSTR (Fix (9000*rnd ()+1000))는 랜덤 숫자를 생성합니다
sfilename = 연도 (날짜) & day (날짜) & 시간 (시간) & 분 (시간) & 두 번째 (시간) & rndstr &.
**긴장
PHP 시스템의 경우 :
fckeditor/편집기/편집기/filemanager/connectors/php/commands.php를 엽니 다
켜기 :
$ SORIGINALFILENAME = $ SFILENAME;
이 문장 앞에 포함 :
// 씨앗 초기화
$ sstr = split (, microtime (), 5);
$ seed = $ str [0]*10000;
// 종자를 사용하여 난수 생성기를 초기화합니다
Srand ($ seed);
// 지정된 범위 내에서 난수를 생성합니다
$ random = rand (1000,10000);
// 파일 이름을 즉시 종합합니다
$ sfilename = date (ymdhis, time ()). $ random ... $ ** 장력;
(5) 프로그램에서 fckeditor가 참조되는 방법.
ASP 시스템의 경우 :
다음 헤더 파일을 포함해야합니다
<!-#plop? file = fckeditor/fckeditor.asp->
편집기 위치에 다음 코드를 추가하십시오.
<%
묘사의 희미한
Ofckeditor 세트 = 새로운 fckeditor
ofckeditor.basepath = / fckeditor /이 경로는 사이트의 루트 디렉토리와 관련이 있어야합니다
표시되지 않습니다
ofckeditor.toolbarset = 기본값
ofckeditor.width = 98%
ofckeditor.height = 500px
ofckeditor.val = 기본값을 설정합니다
ofckeditor.create shangpin_description 편집기의 ID는 입력 태그의 이름 속성 값과 동일합니다.
shangpin_description
%>
php :
편집기 위치에 다음 코드를 추가하십시오.
<? php
ckeditor/fckeditor.php); // 헤더 파일
$ ofckeditor = new fckeditor (shangpin_description); // 입력 태그와 동일합니다.
이름 속성 값, 여기 Shangpin_description이 있습니다
$ ofckeditor-> basepath =/fckeditor/;
$ ofckeditor-> Toolbarset = 기본값;
$ ofckeditor-> 너비 = 98%;
$ ofckeditor-> height = 500px;
$ ofckeditor-> val =;
$ ofckeditor-> create ();
?>
(6) fckeditor에서 데이터를 가져옵니다.
서버 측 스크립팅 프로그램의 경우 편집기 ID를 입력 태그의 이름 속성 값으로 사용하십시오.
ASP의 req st (shangpin_description), php의 $ _req st [shangpin_description]
JS의 fckeditorapi.getinstance (shangpin_description) .getxhtml (tr)를 사용하여 Shangpin_description의 해당 값을 얻으십시오.
CKEDITOR의 ASP 구성
오랫동안 온라인으로 검색 한 후 마침내 찾았습니다! o (∩_∩) o 하하 ~
1. 사용 방법 :
1. 페이지에 ckeditor core 파일 ckeditor.js를 소개합니다.
<script type = text/javaScript src = ckeditor/ckeditor.js> </script>
2. HTML Control <Textarea> 삽입 편집기를 사용하는 곳
<TextArea id = textRea1 cols = 20 줄 = 2 class = ckeditor> </textarea>
ASP.NET 환경 인 경우 서버 측 제어 <TextBox>도 사용할 수 있습니다.
<asp : textbox id = tbcontent runat = Server textMode = multiline class = ckeditor> </asp : textbox>
class = ckeditor가 컨트롤에 추가됩니다.
3. 해당 컨트롤을 편집기 코드로 바꾸십시오
<스크립트 유형 = 텍스트/JavaScript>
ckeditor.replace ( 'textArea1');
// 서버 측 제어 인 경우 asp.net 환경에서 사용되는 <TextBox>
ckeditor.replace ( 'tbcontent');
// <TextBox> 컨트롤이 마스터 페이지에 있으면이 방법을 작성하십시오.
ckeditor.replace ( '< %= tbcontent.clientid.replace (_, $) %>');
</스크립트>
4. 편집기 구성
CKEDITOR의 구성은 CKEDITOR/CONFIG.JS 파일에 집중합니다.
// 인터페이스 언어, 기본값 'en'
config.language = 'zh-cn';
// 너비와 높이를 설정합니다
config.width = 400;
config.height = 400;
// 편집기 스타일의 세 가지 유형이 있습니다 : 'Kama'(기본값), 'Office2003', 'v2'
config.skin = 'v2';
// 배경색
config.uicolor = '#fff';
// 도구 모음 (기본 '기본', 만능 '전체', 사용자 정의) 플러그인/도구 모음/플러그인 .js
config.toolbar = '기본';
config.toolbar = 'full';
이것은 다음과 같이 작동합니다.
config.toolbar_full = [
[ 'source', '-', 'save', 'newpage', 'preview', '-', 'templates'],
[ 'cut', 'copy', 'paste', 'pastetext', 'pastefromword', '-', 'print', 'stainchecker', 'scayt'],
[ 'undo', 'redo', '-', 'find', 'replace', '-', 'selectall', 'removeformat'],
[ 'form', 'checkbox', 'radio', 'textfield', 'textarea', 'select', 'button', 'ImageButton', 'Hiddenfield'],
'/',
[ 'Bold', 'Italic', 'Underline', 'Strike', '-', 'subscript', 'superScript'],
[ '숫자로드리스트', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'],
[ 'restifyleft', 'respitifycenter', 'respitifyright', 'respitifyblock'],
[ 'link', 'unlink', '앵커'],
[ 'Image', 'Flash', 'Table', 'Horizontalrule', 'Smiley', 'SpecialChar', 'PageBreak'],
'/',
[ 'Styles', 'Format', 'font', 'fontsize'],
[ 'TextColor', 'bgcolor']
];
// 도구 모음이 줄어들 수 있습니다
config.toolbarcancollapse = true;
// 툴바의 위치
config.toolbarlocation = 'top'; // 선택 사항 : 하단
// 도구 모음이 기본적으로 확장되는지 여부
config.toolbarstartupexpanded = true;
// 크기를 변경하려면 드래그를 변경합니다
config.resize_enabled = false;
// 크기의 최대 높이를 변경합니다
config.resize_maxheight = 3000;
// 크기의 최대 너비를 변경합니다
config.resize_maxwidth = 3000;
// 크기의 최소 높이를 변경합니다
config.resize_minheight = 250;
// 크기의 최소 너비를 변경합니다
config.resize_minwidth = 750;
//이 편집기가 포함 된 양식을 제출할 때 요소의 데이터를 자동으로 업데이트 할 수 있습니다.
config.autoupDateElement = true;
// 절대 또는 상대 디렉토리, 빈 또는 상대 디렉토리 사용 여부 설정
config.basehref = ''
// 편집기의 z-index 값
config.basefloatzindex = 10000;
// 바로 가기 키를 설정합니다
config.keystrokes = [
[ckeditor.alt + 121 /*f10* /, 'Toolbarfocus'], // 초점을 얻습니다
[ckeditor.alt + 122 /*f11* /, 'elementspathfocus'], // elementsfocus
[ckeditor.shift + 121 /*f10* /, 'contextmenu'], // 텍스트 메뉴
[ckeditor.ctrl + 90 /*z* /, 'undo'], // Revoke
[ckeditor.ctrl + 89 /*y* /, 'redo'], // redo
[ckeditor.ctrl + ckeditor.shift + 90 /*z* /, 'redo'], //
[ckeditor.ctrl + 76 /*l* /, 'link'], // 링크
[ckeditor.ctrl + 66 /*b* /, 'bold'], // bold
[ckeditor.ctrl + 73 /*i* /, 'italic'], // italic
[ckeditor.ctrl + 85 /*u* /, '밑줄'], // 밑줄
[ckeditor.alt + 109 /*-* /, 'Toolbarcollapse']
]]
// 바로 가기 키 설정 브라우저 바로 가기 키 플러그인/키 스트로크/플러그인과 충돌 할 수 있습니다.
config.blockedKeyStrokes = [
ckeditor.ctrl + 66 /*b* /,
ckeditor.ctrl + 73 /*i* /,
ckeditor.ctrl + 85 /*u* /
]]
// 편집 플러그인/colorbutton/plugin.js에서 요소의 배경색 값을 설정합니다.
config.colorbutton_backstyle = {
요소 : '스팬',
스타일 : { '배경색': '#(색)'}
}
// 포 그라운드 색상 값 플러그인/ColorButton/Plugin.js를 설정합니다
config.colorbutton_colors = '000,800000,8B4513,2F4F4F, 008080,000080,4B0082,696969, B222222, A52A2A, DAA520,
006400,40E0D0,0000CD, 800080,808080, F00, FF8C00, FFD700,008000,0FF, 00F, EE82EE,
A9A9A9, FFA07A, FFA500, FFFF00,00FF00, AFEEEE, ADD8E6, DDA0DD, D3D3D3, FFF0F5,
FAEBD7, FFFFE0, F0FFF0, F0FFFF, F0F8FF, E6E6FA, FFF '
// 색상 플러그인을 선택할 때 다른 색상 옵션을 표시할지 여부
config.colorbutton_enablemore = false
// 블록의 전경 색상 기본값은 플러그인/colorbutton/plugin.js로 설정됩니다.
config.colorbutton_forestyle = {
요소 : '스팬',
스타일 : { 'color': '#(color)'}
};
// 여기에 추가 해야하는 CSS 파일을 추가하기 위해 추가하여 웹 사이트의 상대 경로와 절대 경로를 사용할 수 있습니다.
config.contentscss = './contents.css';
// 텍스트 방향
config.contentsLangDirection = 'rtl';
// 구성 파일을 구성하지 않으려면 비워 두십시오.
ckeditor.replace ( 'myfiled', {customconfig : './config.js'});
// 인터페이스 편집 박스 플러그인/대화/플러그인의 배경색
config.dialog_backgroundcovercolor = 'rgb (255, 254, 253)';
config.dialog_backgroundcovercolor = 'white'// default
// 배경의 불투명도 값은 0.0과 1.0 플러그인/대화/플러그인 .js 사이에 있어야합니다.
config.dialog_backgroundcoveropacity = 0.5
// 요소를 움직이거나 변경할 때 테두리의 단위 흡착 거리 단위 : 픽셀 플러그인/대화/플러그인 .js
config.dialog_magnetDistance = 20;
// 로컬 맞춤법 검사를 거부하고 기본값을 기본적으로 거부할지 현재 Firefox 및 Safari 지원 플러그인/Wysiwygarea/Plugin.js.
config.disableNativespellChecker = true
// 테이블 편집 기능 : 예 : 행 또는 열 추가는 현재 플러그인의 Firefox에서만 지원됩니다./Wysiwygarea/Plugin.js
config.disableNativeTableHandles = true;
// config.disableObjectresizing = true;
config.disableobjectresizing = false // 기본값이 활성화되었습니다
// HTML 문서 유형을 설정합니다
config.doctype = '<! doctype html public- // w3c // dtd xhtml 1.0 Transitional // en;
// 편집 영역 플러그인 렌더링/EditingBlock/Plugin.js
config.editingBlock = true;
// 편집기에서 Carriage Return에 의해 생성 된 태그
config.entermode = ckeditor.enter_p;
// 출력 플러그인/엔티티/플러그인에 HTML 엔티티를 사용할지 여부
config.entities = true;
// 더 많은 엔티티 정의 플러그인/엔티티/플러그인 .js
config.entities_additional = ' # 39';
// 디스플레이하기 어려운 문자를 해당 HTML 문자로 변환할지 플러그인/엔티티/플러그인 .js
config.entities_greek = true;
// 일부 라틴 문자를 HTML 플러그인/엔티티/플러그인으로 변환할지 여부
config.entities_latin = true;
// 일부 특수 문자를 ASCII 문자로 변환 할 것입니다
config.entities_processNumerical = false;
// 새 구성 요소를 추가합니다
config.extraplugins = 'myplugin';
// 검색 할 때 하이라이트 색상 플러그인/찾기/플러그인 .js를 사용합니다
config.find_highlight = {
요소 : '스팬',
스타일 : { '배경색': '#ff0', '색상': '#00f'}
};
// 기본 글꼴 이름 플러그인/font/plugin.js
config.font_defaultLabel = 'arial';
// 문자를 편집 할 때 일반적으로 사용되는 중국어를 추가 할 수 있습니다 : Song Font, Kai Font, Bold Font 및 기타 플러그인/font/plugin.js
config.font_names = 'Arial; Times New Roman; Verdana';
// 텍스트 플러그인의 기본 스타일/font/plugin.js
config.font_style = {
요소 : '스팬',
스타일 : { 'font-family': '#(family)'},
재정의 : [{element : 'font', 속성 : { 'face': null}}]
};
// 기본 글꼴 크기 플러그인/font/plugin.js
config.fontsize_defaultlabel = '12px';
// 플러그인/font/plugin.js를 편집 할 때 글꼴 크기 선택 사항
config.fontsize_size = '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; 72/72px '
// 글꼴 크기를 설정할 때 사용되는 스타일 플러그인/font/plugin.js
config.fontsize_style = {
요소 : '스팬',
스타일 : { 'font-size': '#(size)'},
오버라이드 : [{element : 'font', 속성 : { 'size': null}}]
};
// 컨텐츠를 강제로 복사하여 형식 플러그인/pastetext/plugin.js를 제거합니다.
config.forcepasteasplaintext = false // 제거되지 않았습니다
// 강제 및 교체 여부 및 플러그인/htmldataprocessor/plugin.js
config.forcesimpleAmpersand = false;
// 주소 태그 플러그인/Format/Plugin.js 형식
config.format_address = {요소 : '주소', 속성 : {class : 'styledAddress'}};
// div 태그 플러그인/format/plugin.js를 자동으로 포맷합니다
config.format_div = {요소 : 'div', 속성 : {class : 'normaldiv'}};
// H1 태그 플러그인/Format/Plugin.js를 자동으로 포맷하십시오
config.format_h1 = {요소 : 'h1', 속성 : {class : 'contentTitle1'}};
// H2 태그 플러그인/형식/플러그인 .js를 자동으로 포맷합니다
config.format_h2 = {요소 : 'h2', 속성 : {class : 'contentTitle2'}};
// H3 태그 플러그인/Format/Plugin.js를 자동으로 포맷합니다
config.format_h1 = {요소 : 'h3', 속성 : {class : 'contentTitle3'}};
// H4 태그 플러그인/형식/플러그인 .js를 자동으로 포맷하십시오
config.format_h1 = {요소 : 'h4', 속성 : {class : 'contentTitle4'}};
// H5 태그 플러그인/Format/Plugin.js를 자동으로 포맷하십시오
config.format_h1 = {요소 : 'h5', 속성 : {class : 'contentTitle5'}};
// H6 태그 플러그인/Format/Plugin.js를 자동으로 포맷하십시오
config.format_h1 = {요소 : 'h6', 속성 : {class : 'contentTitle6'}};
// 자동 포맷 P 태그 플러그인/형식/플러그인 .js
config.format_p = {요소 : 'p', 속성 : {class : 'normalpara'}};
// 사전 태그 플러그인/format/plugin.js를 자동으로 포맷하십시오
config.format_pre = {element : 'pre', 속성 : {class : 'code'}};
// 도구 모음에 세미콜론 구분 된 태그 이름이있는 도구 모음에 플러그인/형식/플러그인 표시 표시
config.format_tags = 'p; h1; h2; h3; h4; h5; h6; pre; 주소; div';
// 전체 HTML 편집 모드를 사용하면 소스 코드에 <html> <body> </body> </html> 등과 같은 태그가 포함됩니다.
config.fullpage = false;
// 단락에서 빈 문자를 무시할지 여부는 무시하지 않으면 문자는 플러그인/wysiwygarea/plugin.js를 나타냅니다
config.ignoreemptyparagraph = true;
// 그림 속성 상자에서 링크 속성을 지우면 그림 속성 상자에서 링크 속성을 지우는 데 동시에 <a> 태그 플러그인/이미지/플러그인 .js를 지우십니까? <a> 태그 플러그인/Image/Plugin.js
config.image_removelinkbyemptyurl = true;
// 쉼표로 구분 된 레이블 이름 세트가 왼쪽 하단 코너 플러그인/메뉴/플러그인의 계층 중첩에 표시됩니다.
config.menu_groups = '클립 보드, 양식, 식탁보, TablecellProperties, Tablerow, Tablecolumn, 테이블, 앵커, 링크, 이미지, 플래시, 확인란, 라디오, 텍스트 필드, hiddenfield, ImageButton, Button, Select, TextRea';
// 하위 메뉴를 표시 할 때 지연, 장치 : MS 플러그인/메뉴/플러그인 .js
config.menu_submenudelay = 400;
// 새 명령을 실행할 때 편집기 플러그인/NewPage/Plugin.js의 내용
config.newpage_html = '';
// Word에서 텍스트를 복사 할 때 텍스트를 형식화하고 플러그인을 제거 할 것인지/Pastefromword/Plugin.js를 제거하십시오.
config.pastefromwordignorefontface = true; // 기본값은 무시됩니다
// <H1> <H2> 및 기타 태그를 사용하여 Word Document 플러그인/Pastefromword/Plugin.js에서 붙여 넣은 콘텐츠를 수정하거나 교체할지 여부
config.pastefromwordkeepsstructure = false;
// Word에서 콘텐츠를 붙여 넣을 때 형식 플러그인/pastefromword/plugin.js를 제거할지 여부
config.pastefromwordremovestyle = false;
// 배경 언어의 유형에 따라 출력 HTML 컨텐츠를 형식화하면 기본값이 비어 있습니다.
config.protectedsource.push (/? [/s/s]*?/?>/g);
config.protectedSource.push (// g);
config.protectedSource.push (/(]+> [/s |/s]*? <// asp : [^/>]+>) | (]+// gi); // asp.net 코드
// 입력 할 때 삽입 된 태그 : Shift+Enter
config.shiftenterMode = ckeditor.enter_p;
// 선택적 이모티콘 대체 문자 플러그인/스마일/플러그인 .js.
config.smiley_descriptions = [
':),':( ',';) ',': d ',':/',': p ',
'', '', ',' ',' ',' ',' ',' ',' ',
'', '; (', '', ',' ',' ',' ',' ',' ',
'', ':키스', '' ];
// 해당 표현식 사진 플러그인/Smiley/Plugin.js
config.smiley_images = [
'regular_smile.gif', 'sad_smile.gif', 'wink_smile.gif', 'tooth_smile.gif', 'confused_smile.gif', 'tounge_smile.gif',
'embaressed_smile.gif', 'omg_smile.gif', 'whatchutalkingabout_smile.gif', 'shenute_smile.gif', 'angel_smile.gif', 'shades_smile.gif',
'devil_smile.gif', 'cry_smile.gif', 'lightbulb.gif', 'thumbs_down.gif', 'thumbs_up.gif', 'heart.gif',
'broken_heart.gif', 'Kiss.gif', 'ennvelope.gif'];
// 표현식 플러그인의 주소/Smiley/Plugin.js
config.smiley_path = '플러그인/스마일/이미지/';
// 페이지가로드되면 편집 상자에 즉시 초점을 맞 춥니 다.
config.startupfocus = false;
//로드시 소스 코드 및 wysiwyg 소스 및 WysiWyg 플러그인/editingBlock/Plugin.js를 편집하는 방법.
config.startupmode = 'wysiwyg';
//로드시 프레임 플러그인의 경계를 표시합니까?/ShowBlocks/Plugin.js
config.startUpoutLineBlocks = false;
// 스타일 파일 플러그인/Stylescombo/Plugin.js로드할지 여부.
config.stylescombo_stylesset = 'default';
// 다음은 선택 사항입니다
config.stylescombo_stylesset = 'mystyles';
config.stylescombo_stylesset = 'mystyles :/editorstyles/styles.js';
config.stylescombo_stylesset = 'mystyles : http : //www.example.com/editorstyles/styles.js';
// 시작 인덱스 값
config.tabindex = 0;
// 사용자가 입력 한 탭, 편집기가 전달하는 공백 수 () 값이 0이면 편집 박스 플러그인/탭/플러그인 .js에서 초점이 이동합니다.
config.tabspaces = 0;
// 기본 템플릿 플러그인/템플릿/플러그인이 사용됩니다.
config.templates = 'default';
// COMMA로 구분 된 템플릿 파일 플러그인/템플릿/Plugin.js.
config.templates_files = [ '플러그인/템플릿/템플릿/default.js']
// 템플릿을 사용하면 컨텐츠를 편집하면 플러그인/템플릿/플러그인에 대한 상자가 선택됩니다
config.templates_ReplaceContent = true;
//주제
config.theme = 'default';
// 레코드 단계 철회 플러그인/undo/plugin.js
config.undostacksize = 20;
// CKEDITOR에 CKFINDER를 통합하려면 CKFINDER의 경로 선택이 정확해야합니다.
//ckfinder.setupckeditor(null, '/ckfinder/');