SoFunction
Updated on 2025-04-07

FCKeditor 2.6.5 ASP environment installation configuration instructions

(1) Simplify, "too much words will lead to mistakes", and too many documents are also a hidden danger. FCKEditor supports a variety of server scripting languages. When we actually use it, we can't use so many files at all. We need to streamline them according to our needs.
For ASP systems:

FCKEditor root directory, only retained ",,,,,,
"These files and editor directory. Delete the sample directory "_samples".
The "fckeditor\editor\filemanager\connectors" directory only retains the "asp" directory and deletes other directories and files.

(2) Modify the script program (language) used to upload the file.

The default FCKEditor file upload program is asp. If it is used in the asp system, there is no need to modify it.

If it is used in PHP system, you need to make the following modifications and open
turn up:
var _FileBrowserLang ge = asp
var _QuickUploadLang ge = asp
Change to:
var _FileBrowserLang ge = php
var _QuickUploadLang ge = php

(3) Turn on file upload and modify the file upload directory.

For ASP systems:
Open fckeditor\editor\filemanager\connectors\asp\
Enable file upload:

turn up:
ConfigIsEnabled = false

Change to:
ConfigIsEnabled = tr

Set up the upload and storage directory:

turn up:
ConfigUserFilesPath = "/admin/uppic/"
Change to:
ConfigUserFilesPath = "Custom Path"

For PHP systems:
Open fckeditor/editor/filemanager/browser/default/connectors/php/
Enable file upload:

turn up:
$Config[Enabled] = false

Change to:
$Config[Enabled] = tr

Set up the upload and storage directory:

turn up:
$Config[UserFilesPath] = /userfiles/
Change to:
$Config[UserFilesPath] = Custom path

(4) Modify the uploaded file naming method.

FCKEditor uploads files, the file name uses the original file name. If you want to use a custom file naming method (such as the name), you can modify it as follows
square:

For ASP systems:
Open fckeditor\sample\edit\edit\edit\edit\filemanager\connectors\asp\

turn up:
sFileName = SanitizeFileName( sFileName )

Change this sentence to a custom file naming format, for example:

dim RndStr
Randomize
RndStr = Cstr(Fix(9000*rnd()+1000)) generates a random number
sFileName =year(date)&month(Date)&day(Date)&hour(time)&minute(time)&second(time)&RndStr &"." &
**tension

For PHP systems:
Open fckeditor\editor\editor\filemanager\connectors\php\

turn up:
$sOriginalFileName = $sFileName ;

Added before this sentence:

// Initialize the seed
$sstr =split(" ",microtime(),5);
$seed =$sstr[0]*10000;
// Initialize the random number generator with seed
srand($seed);
// Generate random numbers within the specified range
$random =rand(1000,10000);
// Synthesize the file name immediately
$sFileName = date("YmdHis", time()).$random.".".$**tension;


(5) How FCKEditor is referenced in the program.

For ASP systems:
Need to include the following header file
<!--#incl? file="fckeditor/"-->
Add the following code to the editor location:
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
= "/fckeditor/" This path must be relative to the root directory of the site. Set the error editor
Will not be displayed

="Default"
= "98%"
= "500px"

= "" Set the default value
The id of the editor is equivalent to the name attribute value of the input tag, here is
shangpin_description
%>

For PHP:
Add the following code to the editor location:
<?php
incl?("fckeditor/"); // header file
$oFCKeditor = new FCKeditor("shangpin_description"); // The id of the editor is equivalent to the input tag
name attribute value, here is shangpin_description
$oFCKeditor->BasePath="/fckeditor/ " ; //Set the FCKeditor path

$oFCKeditor->ToolbarSet ="Default";
$oFCKeditor->Width="98%";
$oFCKeditor->Height="500px";

$oFCKeditor->Val=""; // Set the default value
$oFCKeditor->Create();
?>

(6) Get the data in FCKEditor.

For server-side scripting programs, just use the "editor id" as the name attribute value of the input tag, for example:

Reqst("shangpin_description") in ASP, $_REQST["shangpin_description"] in PHP

Use (shangpin_description).GetXHTML(tr) in JS to get the corresponding value of shangpin_description





ASP configuration of ckEditor

After searching online for a long time, I finally found it! O(∩_∩)O Haha~
1. How to use:

1. Introduce the ckeditor core file in the page <head>

<script type="text/javascript" src="ckeditor/"></script>

2. Insert HTML control <textarea> where you use the editor

<textarea cols="20" rows="2" class="ckeditor"></textarea>

If it is an environment, the server-side control <TextBox> can also be used.

<asp:TextBox ID="tbContent" runat="server" TextMode="MultiLine" class="ckeditor"></asp:TextBox>

Note that class="ckeditor" is added to the control.

3. Replace the corresponding control with editor code

<script type="text/javascript">
('TextArea1');
//If it is a server-side control <TextBox> used in the environment
('tbContent');
//If the <TextBox> control is in the master page, write this way
('<%=("_","$") %>');
</script>

4. Configure Editor

The configuration of ckeditor is concentrated in the ckeditor/ file. The following are some commonly used configuration parameters:

// Interface language, default to 'en'

= 'zh-cn';

// Set width and height

= 400;

= 400;

// There are three types of editor styles: 'kama' (default), 'office2003', 'v2'

= 'v2';

// Background color

= '#FFF';

// Toolbar (basic 'Basic', all-round 'Full', custom) plugins/toolbar/

= 'Basic';

= 'Full';

This will work with:
config.toolbar_Full = [
['Source','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
'/',
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],
'/',
['Styles','Format','Font','FontSize'],
['TextColor','BGColor']
];

//Can the toolbar be shrinkable
= true;

//The location of the toolbar
= 'top';//Optional: bottom

//Whether the toolbar is expanded by default
= true;

// Cancel the “Drag to change size” function plugins/resize/
config.resize_enabled = false;

//Change the maximum height of size

config.resize_maxHeight = 3000;

//Change the maximum width of size
config.resize_maxWidth = 3000;

//Change the minimum height of size
config.resize_minHeight = 250;

//Change the minimum width of size
config.resize_minWidth = 750;
// When submitting a form containing this editor, is it possible to update the data in the element automatically
= true;

// Set whether to use absolute or relative directories, empty or relative directories
= ''

// The z-index value of the editor
= 10000;

//Set shortcut keys
= [
[ + 121 /*F10*/, 'toolbarFocus' ], //Get focus
[ + 122 /*F11*/, 'elementsPathFocus' ], //Element Focus

[ + 121 /*F10*/, 'contextMenu' ], //Text Menu

[ + 90 /*Z*/, 'undo' ], //Revoke
[ + 89 /*Y*/, 'redo' ], //Redo
[ + + 90 /*Z*/, 'redo' ], //

[ + 76 /*L*/, 'link' ], // Link

[ + 66 /*B*/, 'bold' ], //Bold
[ + 73 /*I*/, 'italic' ], //Italic
[ + 85 /*U*/, 'underline' ], //Underline

[ + 109 /*-*/, 'toolbarCollapse' ]
]

//Set shortcut keys. It may conflict with browser shortcut keys plugins/keystrokes/.
= [
+ 66 /*B*/,
+ 73 /*I*/,
+ 85 /*U*/
]

//Set the value of the background color of the element in the edit plugins/colorbutton/.
config.colorButton_backStyle = {
element : 'span',
styles : { 'background-color' : '#(color)' }
}

//Set the foreground color value plugins/colorbutton/
config.colorButton_colors = '000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,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'

//Whether to display the "Other Color" option when selecting color plugins/colorbutton/
config.colorButton_enableMore = false

//The foreground color default value of the block is set to plugins/colorbutton/
config.colorButton_foreStyle = {
element : 'span',
styles : { 'color' : '#(color)' }
};

//The CSS file you need to add is added here You can use the relative path and the absolute path of the website.
= './';

//Text direction
= 'rtl'; //From left to right

//CKeditor configuration file If you don't want to configure it, just leave it blank
( 'myfiled', { customConfig : './' } );

//The background color of the interface editing box plugins/dialog/
config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)'; //Reference can be set
config.dialog_backgroundCoverColor = 'white' //Default

//The opacity of the background should be between: 0.0 and 1.0 plugins/dialog/
config.dialog_backgroundCoverOpacity = 0.5

//Add distance of border when moving or changing elements Unit: pixel plugins/dialog/
config.dialog_magnetDistance = 20;

// Whether to reject local spell checks and prompts. Default is rejected. Currently, only firefox and safari support plugins/wysiwygarea/.
= true

//Table editing function, such as: Add rows or columns, currently only firefox supports plugins/wysiwygarea/
= true; //Default is not enabled

//Whether to enable the change size function of pictures and tables = true;
= false //Default is on

//Set HTML document type
= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ";

//Whether to render the editing area plugins/editingblock/
= true;

//The tag generated by carriage return in the editor
= CKEDITOR.ENTER_P; //Optional: CKEDITOR.ENTER_BR or CKEDITOR.ENTER_DIV

//Whether to use HTML entities to output plugins/entities/
= true;

//Define more entities plugins/entities/
config.entities_additional = '#39'; // Where # replaces&

//Whether to convert some difficult-to-display characters to the corresponding HTML characters plugins/entities/
config.entities_greek = true;

//Whether to convert some Latin characters to HTML plugins/entities/
config.entities_latin = true;

//Whether to convert some special characters to ASCII characters, such as "This is Chinese: Chinese." Convert to "This is Chinese: Chinese." plugins/entities/
config.entities_processNumerical = false;

//Add new components
= 'myplugin'; //Not default Example only

//Use the highlight color when searching plugins/find/
config.find_highlight = {
element : 'span',
styles : { 'background-color' : '#ff0', 'color' : '#00f' }
};

//Default font name plugins/font/
config.font_defaultLabel = 'Arial';

// Character set when editing fonts You can add commonly used Chinese characters: Song font, Kai font, bold font, etc. plugins/font/
config.font_names = 'Arial;Times New Roman;Verdana';

//Default style of text plugins/font/
config.font_style = {
element : 'span',
styles : { 'font-family' : '#(family)' },
overrides : [ { element : 'font', attributes : { 'face' : null } } ]
};

//The default font size plugins/font/
config.fontSize_defaultLabel = '12px';

//Add font size optional when editing plugins/font/
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;72/72px'

//The style used when setting the font size plugins/font/
config.fontSize_style = {
element : 'span',
styles : { 'font-size' : '#(size)' },
overrides : [ { element : 'font', attributes : { 'size' : null } } ]
};

//Whether to force copy the content to remove format plugins/pastetext/
=false //Not removed

//Whether to force "&" to replace "&" plugins/htmldataprocessor/
= false;

//Format the address tag plugins/format/
config.format_address = { element : 'address', attributes : { class : 'styledAddress' } };

//Automatically format DIV tags plugins/format/
config.format_div = { element : 'div', attributes : { class : 'normalDiv' } };

//Automatically format the H1 tag plugins/format/
config.format_h1 = { element : 'h1', attributes : { class : 'contentTitle1' } };

//Automatically format the H2 tag plugins/format/
config.format_h2 = { element : 'h2', attributes : { class : 'contentTitle2' } };

//Automatically format the H3 tag plugins/format/
config.format_h1 = { element : 'h3', attributes : { class : 'contentTitle3' } };

//Automatically format the H4 tag plugins/format/
config.format_h1 = { element : 'h4', attributes : { class : 'contentTitle4' } };

//Automatically format the H5 tag plugins/format/
config.format_h1 = { element : 'h5', attributes : { class : 'contentTitle5' } };

//Automatically format the H6 tag plugins/format/
config.format_h1 = { element : 'h6', attributes : { class : 'contentTitle6' } };

//Automatically format P tags plugins/format/
config.format_p = { element : 'p', attributes : { class : 'normalPara' } };

//Automatically format the PRE tags plugins/format/
config.format_pre = { element : 'pre', attributes : { class : 'code' } };

//Separated tag names with semicolons Show plugins/format/ on the toolbar
config.format_tags = 'p;h1;h2;h3;h4;h5;h6;pre;address;div';

//Whether to use the complete html editing mode. If used, its source code will contain tags such as <html><body></body></html>.
= false;

//Whether to ignore empty characters in paragraphs? If not ignore them, the characters will be represented by "" plugins/wysiwygarea/
= true;

//When clearing the link attributes in the picture attribute box, do I clear the <a> tag plugins/image/ on both sides at the same time?
config.image_removeLinkByEmptyURL = true;

//A set of comma-separated label names are displayed in the hierarchical nesting in the lower left corner plugins/menu/.
config.menu_groups ='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea';

//Delay when displaying submenu, unit: ms plugins/menu/
config.menu_subMenuDelay = 400;

//When executing the "New" command, the contents in the editor plugins/newpage/
config.newpage_html = '';

//When copying text from word, whether to format and remove the text plugins/pastefromword/
= true; //Default is to ignore format

//Whether to use <h1><h2> and other tags to modify or replace the content pasted from the word document plugins/pastefromword/
= false;

//Whether to remove the format when pasting content from word plugins/pastefromword/
= false;

//Format the output HTML content according to the type of the background language, the default is empty
( /<\?[\s\S]*?\?>/g ); // PHP Code
( //g ); // ASP Code
( /(]+>[\s|\S]*?<\/asp:[^\>]+>)|(]+\/>)/gi ); // Code

//The tag inserted when input: shift+Enter
= CKEDITOR.ENTER_P; //Optional: CKEDITOR.ENTER_BR or CKEDITOR.ENTER_DIV

//Optional expression substitute characters plugins/smiley/.
config.smiley_descriptions = [
':)', ':(', ';)', ':D', ':/', ':P',
'', '', '', '', '', '',
'', ';(', '', '', '', '',
'', ':kiss', '' ];

// Corresponding expression pictures plugins/smiley/
config.smiley_images = [
'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif',
'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif',
'devil_smile.gif','cry_smile.gif','','thumbs_down.gif','thumbs_up.gif','',
'broken_heart.gif','',''];

//The address of the expression plugins/smiley/
config.smiley_path = 'plugins/smiley/images/';

//When the page is loading, does the edit box get the focus immediately plugins/editingblock/ plugins/editingblock/.
= false;

//How to edit the source code and what to see is what to get when loading: "source" and "wysiwyg" plugins/editingblock/.
='wysiwyg';

//Whether to display the frame border plugins/showblocks/
= false;

// Whether to load the style file plugins/stylescombo/.
config.stylesCombo_stylesSet = 'default';
//The following are optional
config.stylesCombo_stylesSet = 'mystyles';
config.stylesCombo_stylesSet = 'mystyles:/editorstyles/';
config.stylesCombo_stylesSet = 'mystyles:/editorstyles/';

//The starting index value
= 0;

//When the user typed TAB, the number of spaces passed by the editor, ( ) When the value is 0, the focus will be moved out of the edit box plugins/tab/
= 0;

//The default template plugins/templates/.
= 'default';

//Comma-separated template file plugins/templates/.
config.templates_files = [ 'plugins/templates/templates/' ]

//When using templates, whether the "Edit content will be replaced" box is selected plugins/templates/
config.templates_replaceContent = true;

//theme
= 'default';

//Revoked record steps plugins/undo/
=20;

// Integrate CKFinder in CKEditor, note that the path selection of ckfinder must be correct.
//(null, '/ckfinder/');