How to use the FCKeditor Web page Editor

Source: Internet
Author: User

It does not need to install any form of client, compatible with the vast majority of mainstream browsers, support ASP.net, ASP, ColdFusion, PHP, JSP, Active-foxpro, Lasso, Perl, Ython and other programming environments.

Official website http://www.fckeditor.net/

Official documents http://wiki.fckeditor.net/

Download Address http://www.fckeditor.net/download/default.html

FCKeditor Installation and Configuration

Download the Fckeditor2.63.zip and fckeditor.net2.63 version of the 2 Zip packages

(a) fckeditor_2.6.3 are resource files such as HTML files, JavaScript files, and pictures

(b) Fckeditor.net_2.6.3.zip is a asp.net control dll file

Add a reference to FCKeditor in the ASP.net project

1. Select Add Reference on project to find FredCK.FCKeditorV2.dll or copy FredCK.FCKeditorV2.dll directly into the project's Bin directory

2. For easy development, FredCK.FCKeditorV2.dll controls can also be added to the toolbox of VS

3. Configure Web.config, add at <appSettings> node as follows:

<appSettings>

<!--fckeditor text edit control configuration-->

<add key= "Fckeditor.basepath" value= "~/fckeditor/"/>

<add key= "Fckeditor.userfilespath" value= "/Solution name/uploads"/> //Userfilespath The text path can be in the fckeditor/editor/ Change in Filemanager/connectors/aspx/config.ascx

</appSettings> 
4. Use in Web pages
<fckeditorv2:fckeditor id= "FCKeditor" runat= "Server" basepath= "~/fckeditor/" >//basepath specified to the root directory of FCKeditor < /fckeditorv2:fckeditor>
 

FCKeditor configuration:

Go to the FCKeditor folder and edit the Fckconfig.js file

1. Modify (change to the language you are currently using)

var _filebrowserlanguage = ' aspx '; //asp | aspx | cfm | lasso | perl | php | py

var _quickuploadlanguage = ' aspx '; //asp | aspx | cfm | lasso | perl | php | py

2. Modify the configuration language

fckconfig.defaultlanguage = ' en ' for: fckconfig.defaultlanguage = ' ZH-CN ';

3, the disposition skin, has the default, office2003, silver style and so on.

Fckconfig.skinpath = Fckconfig.basepath + ' skins/default/';

4. You can use the TAB key in the Editor field. (1 for Yes, 0 for No)

fckconfig.tabspaces = 0; Changed to Fckconfig.tabspaces = 1;

5, plus a few commonly used fonts:

Fckconfig.fontnames = ' song body; bold; official script; italics _gb2312; Arial; Comic Sans MS; Courier New; Tahoma; Times New Roman; Verdana ';

6, the editor domain default display font is 12PX, want to modify the style sheet can be modified to meet the requirements, open/editor/css/fck_editorarea.css, modify font-size properties can

7. About Security

If your editor is not certified in front of the desk, recommend using basic toolbar

fckconfig.toolbarsets["Basic"] = [
[' Bold ', ' Italic ', '-', ' orderedlist ', ' unorderedlist ', '-', ' Link ', ' Unlink ', ' Image ', '-', ' about ']

] ;

8, in the Upload File window Click Browse Server, may appear the server didn ' t send back a proper XML ... error prompts, because FCKeditor requires different types of files to be uploaded to different directories, including directories such as File,image,falsh,media, you can first set up to try.

Security Configuration for Fckeditor.net 2.6

File Upload, Error: (This connector is disabled.please check the "editor/filemanager/connectors/aspx/config.ascx" file.)

Returns true if the Editor/filemanager/connectors/aspx/config.ascx file is opened.

Copy Code code as follows:

private bool Checkauthentication ()
{
Warning:do not simply return "true". By doing so, your are allowing
"Anyone" to upload and list the files in your server. You must implement
Some kind of validation here. Even something very simple as ...
//
Return (session["isauthorized"]!= null && (BOOL) session["isauthorized"] = = true);
//
... where session["isauthorized" is set to "true" as soon as the
User logs in your system.

return true;
}

streamlining and cleaning of fckeditor
Enter the FCKeditor folder, delete all files and folders that start with "_" and remove the FCKeditor folder suffix named:. AFP,. CFC,. CFM,. Lasso,. pl,. py,. txt files, Only keep the FCKeditor folder under Fckconfig.js, Fckeditor.js, Fckstyles.xml, fcktemplates.xml on it;
Enter the Editor folder, delete the "_source" folder, where the same is the source file;
Lang inside is the language pack, if only in Simplified Chinese, then only keep fcklanguagemanager.js, zh-cn.js two files on OK, we suggest to retain en.js (English), Zh.js (Traditional Chinese) two files, Fcklanguagemanager.js is a language configuration file, with its ability and fckconfig.js set in pairs, corresponding to the corresponding language files, we must keep!
A brief introduction to the configuration file Fckconfig.js Chinese comments. If there is an understanding of the wrong place please leave a message.
Fckconfig.customconfigurationspath = '; Custom profile path and name
Fckconfig.editorareacss = Fckconfig.basepath + ' css/fck_editorarea.css '; Style sheet file path for text editing area

Fckconfig.editorareastyles = '; Style sheet style for text editing areas
Fckconfig.toolbarcombopreviewcss = '; Toolbar Preview CSS
Fckconfig.doctype = '; Document type
Fckconfig.basehref = '; Base Address of relative links
Fckconfig.fullpage = false; Whether to allow editing of the entire HTML file, or only to edit the content between the body
Fckconfig.startupshowblocks = false; Whether to enable the display module
Fckconfig.debug = false; Whether to turn on the Debug window feature
Fckconfig.allowquerystringdebug = true; Whether to enable Web query debugging features
Fckconfig.skinpath = Fckconfig.basepath + ' skins/default/'; FCKeditor Skin Path
Fckconfig.skineditorcss = '; The skin CSS path for the editor
Fckconfig.skindialogcss = '; The skin CSS Path of the dialog window
Fckconfig.preloadimages = [Fckconfig.skinpath + ' images/toolbar.start.gif ', Fckconfig.skinpath + ' images/ Toolbar.buttonarrow.gif '];
Pre-loaded pictures

Fckconfig.pluginspath = Fckconfig.basepath + ' plugins/'; Plug-in path
Fckconfig.autogrowmax = 400;
The text editing area allows the maximum height limit for automatic growth, which should be set at the same time
FCKCONFIG.PLUGINS.ADD (' autogrow '); annotation removal of attributes, combined with
Fckconfig.autodetectlanguage = true; Whether to automatically detect languages
fckconfig.defaultlanguage = ' en '; Default language
fckconfig.contentlangdirection = ' ltr '; Default text direction, optional "Ltr/rtl", that is, from left to right or right to left
Fckconfig.processhtmlentities = true; Working with HTML entities
Fckconfig.includelatinentities = true; including Latin
Fckconfig.includegreekentities = true; Including the Greek language
Fckconfig.processnumericentities = false; Working with digital entities
Fckconfig.additionalnumericentities = '; Attached digital Entities
Fckconfig.fillemptyblocks = true; Whether to fill empty blocks
Fckconfig.formatsource = true; Whether to automatically format code when switching to Code view
Fckconfig.formatoutput = true; Whether to automatically format the code when the content is output
Fckconfig.formatindentator = '; When the code is indented in source format to use the character
Fckconfig.emailprotection = ' None '; Detect Email Links
Fckconfig.emailprotectionfunction = ' MT (name,domain,subject,body) '; Detect Email Links
Fckconfig.startupfocus = false; Whether the focus is on the editor when the page is opened, whether the cursor stays on the FCKeditor
Fckconfig.forcepasteasplaintext = false; Whether to force paste as plain text content
Fckconfig.autodetectpastefromword = true; Whether to automatically detect paste files from Word, only support IE
Fckconfig.showdropdialog = true; Whether to display the Drop-down menu
Fckconfig.forcesimpleampersand = false; Do not convert & symbols to XML entities
fckconfig.tabspaces = 0; The number of cursor jumps when the TAB key is pressed, and the default value is zero.
Fckconfig.showborders = true; Whether to merge borders
Fckconfig.sourcepopup = false; Whether to eject
Fckconfig.toolbarstartexpanded = true; Start the FCKeditor toolbar to expand by default
Fckconfig.toolbarcancollapse = true; Whether to allow the collapse or expansion of toolbars
Fckconfig.ignoreemptyparagraphvalue = true; Whether to ignore empty paragraph values
Fckconfig.floatingpanelszindex = 10000; Floating Panel Index
Fckconfig.htmlencodeoutput = false; Whether to output HTML encoding
Fckconfig.templatereplaceall = true; Do you want to replace all templates
Fckconfig.templatereplacecheckbox = true; Whether to display the actual content in the stencil window
fckconfig.toolbarlocation = ' in '; Toolbar location
fckconfig.toolbarsets["Default"///Configure the buttons in the Defaults toolbar for background editing
fckconfig.toolbarsets["Basic"//Configure basic toolbar buttons for front desk editors
Fckconfig.entermode = ' P '; Press ENTER to automatically generate <P></P> label when editing text
Fckconfig.shiftentermode = ' BR '; Press shift+ enter to automatically generate &LT;BR/> label when editing text
Fckconfig.keystrokes//Custom keyboard shortcuts
Fckconfig.contextmenu//Define the contents of the right-click menu
Fckconfig.browsercontextmenuonctrl = false; If you want to allow the CTRL key to be pressed in the editing area, click the right mouse button to display the context menu of the browser
Fckconfig.browsercontextmenu = false; Whether to allow the right mouse click in the editing area to display the context menu of the browser
Fckconfig.enablemorefontcolors = true; Do you want to prevent more color options
Fckconfig.fontcolors//Text color list
Fckconfig.fontformats//Text Format list
Fckconfig.fontnames//Font list
fckconfig.fontsizes//Font Size list
Fckconfig.stylesxmlpath = Fckconfig.editorpath + ' fckstyles.xml '; The location of the XML file for the CSS style list
Fckconfig.templatesxmlpath = Fckconfig.editorpath + ' fcktemplates.xml '; Template's XML file location
Fckconfig.spellchecker = ' WSC '; spelling checker
Fckconfig.iespelldownloadurl = ' http://www.iespell.com/download.php '; Download the spelling checker URL
Fckconfig.spellerpagesserverscript = ' server-scripts/spellchecker.php '; Spelling checker Script Path
Fckconfig.firefoxspellchecker = false; Firefox browser spell check
Fckconfig.maxundolevels = 15; Maximum number of times that can be undone
Fckconfig.disableobjectresizing = false; Do you want to prevent users from resizing images and tables
Fckconfig.disablefftablehandles = true; Do you want to disable the table tool
Fckconfig.linkdlghidetarget = false; Whether to hide the target label for the link window
fckconfig.linkdlghideadvanced = false; Do you want to hide the Advanced tab of the link window
Fckconfig.imagedlghidelink = false; Do you want to hide the link label for the image window
fckconfig.imagedlghideadvanced = false; Whether to hide the advanced label of the image window
fckconfig.flashdlghideadvanced = false; Whether to hide the advanced label for the Flash window
Fckconfig.protectedtags = '; Add HTML formatting
Fckconfig.bodyid = '; Set the ID of the editor
Fckconfig.bodyclass = '; Set the class for the editor
Fckconfig.defaultstylelabel = '; Set the style of the text editor, default to blank document
Fckconfig.defaultfontformatlabel = '; Set default format
Fckconfig.defaultfontlabel = '; Set Default font
Fckconfig.defaultfontsizelabel = '; Set Default font Size
Fckconfig.defaultlinktarget = '; Set default link destinations (_blank, _self _parent, _top)
Fckconfig.cleanwordkeepsstructure = false; Do you want to paste directly into Word format
Fckconfig.removeformattags//Delete text to delete the appropriate format
Fckconfig.removeattributes//Delete text to delete the corresponding style
Fckconfig.customstyles//Style menu
Fckconfig.corestyles//Set FCKeditor core style
Fckconfig.indentlength = 40; Length of indent in editor
Fckconfig.indentunit = ' px '; Unit of indent in editor
Fckconfig.indentclasses = []; FCKeditor allows you to indent using CSS
Fckconfig.justifyclasses = []; FCKeditor allows CSS class text to be used
var _filebrowserlanguage = ' php '; Language used by file browsers
var _quickuploadlanguage = ' php '; Language used for fast uploading
var _filebrowserextension = _filebrowserlanguage = = ' Perl '? ' CGI ': _filebrowserlanguage; File browser extensions
var _quickuploadextension = _quickuploadlanguage = = ' Perl '? ' CGI ': _quickuploadlanguage; Fast upload Extension
Fckconfig.linkbrowser = true; Whether to allow browsing of servers when linking is inserted
Browse Server URL when fckconfig.linkbrowserurl//Insert Link
Fckconfig.linkbrowserwindowwidth//Link target browser window width
Fckconfig.linkbrowserwindowheight//Link target browser window height
Fckconfig.imagebrowser = true; Do you want to turn off picture file browsing Server features
Fckconfig.imagebrowserurl//Picture file Browse Server URL
Fckconfig.imagebrowserwindowwidth//Image browser window width
Fckconfig.imagebrowserwindowheight//Image browser window height
Fckconfig.flashbrowser = true; Do you want to turn off Flash browsing Server features
Fckconfig.flashbrowserurl//flash Browse Server URL
Fckconfig.flashbrowserwindowwidth//flash browser window width
Fckconfig.flashbrowserwindowheight//flash browser window height
Fckconfig.linkupload = true; Whether to turn on file upload function
Fckconfig.linkuploadurl//Specify the address of the default upload file
Fckconfig.linkuploadallowedextensions//Set extensions to allow uploaded files
Fckconfig.linkuploaddeniedextensions = ""; To set an extension that allows you to upload script files
Fckconfig.imageupload = true; Whether to open the image upload function
Fckconfig.imageuploadurl//Specify the address of the default upload picture file
Fckconfig.imageuploadallowedextensions//Set extensions that allow uploading of picture files
Fckconfig.imageuploaddeniedextensions = ""; Set extensions that allow uploading of picture script files
Fckconfig.flashupload = true; Whether to turn on flash upload function
Fckconfig.flashuploadurl//flash The address of the uploaded file
Fckconfig.flashuploadallowedextensions//Set extensions to allow Flash files to be uploaded
Fckconfig.flashuploaddeniedextensions = ""; Set up extensions to allow Flash script files to be uploaded
Fckconfig.smileypath//Insert the expression icon path
Fckconfig.smileyimages//Emoticons icon file name
Fckconfig.smileycolumns = 8; The expression window shows the number of expression columns
Fckconfig.smileywindowwidth = 320; The expression window shows the width, and this window adjusts for changes in the expression file.
Fckconfig.smileywindowheight = 210; The expression window shows the height, and this window adjusts for changes in the expression file.
Fckconfig.backgroundblockercolor = ' #ffffff '; The color that the background covers when the editor pops up the window
Fckconfig.backgroundblockeropacity = 0.50; The transparency of the background when the editor pops up the window
Fckconfig.mswebbrowsercontrolcompat = false;
Fckconfig.preventsubmithandler = false;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.