FCKEDITOR settings

xiaoxiao2021-04-04  290

The FCKEDITOR version 2.0 is finally coming out, and the word "finally" is because of the Flash insert function returned by the expedition on this version. It can be said that in all online editors, FCKEditor is the best editor on the Internet, powerful, supporting a variety of browsers, no platform restrictions, can be integrated with a variety of web languages, multi-language support, open source, etc. ~~ For a brand new website, Fckeditor can take it directly, do not need to modify it. But for the vast majority of existing websites, some settings of FCKEDITOR are not suitable for their use. This article is designed to tell you simple modifying Fckeditor to make it easy for your website. The first job is to streamline this functional editor. Of course, the file is streamlined and non-functional. Here I take the ASP version of FcKeditor as an example, enter the Fckeditor 2.0 folder, first delete the folder starting with "_", and put an example or some other tools in these folders. In fact, it is only to retain Editor folder, fckconfig.js, fckeditor.asp, fckeditor.js, fiqustyles.xml, fcktemplates.xml is OK, the outermost layer is complete, enter the Editor folder, first " _Source "folder delete, here is some source files, nothing to use for use. Enter the image folder, delete the Smiley folder, some files are in the emoticon icon, because I will use my own expression icon, first put their delete, of course, if you want to use the expression icon here, don't delete Lost. Exit Images and then enter the lang folder. The things here can be cleaned, only the four files of fcklanguagemanager.js, zh-cn.js, en.js, en.js, the first file is language configuration File, there is it to set the corresponding language files in the FCKConfig.js, en-cn.js is a Simplified Chinese language package, en.js don't have to say it, zh.js is traditional Chinese. how about it? I have a few hundred k, cool ~ I will exit the lang folder, enter the Skin folder, if you want to use the fckeditor's default, this milk yellow, then delete the other two folders except the default folder. If you want to use something else, you will consider it, but I give you a suggestion. If you don't want to use the default, then you choose the Silver, because the silver is also a gray and any color, it will not be ugly, and that office2003 Skin, anyway, I am very disappeared, and the picture is relatively large, but also add the download time, don't! Streamlined final step, exiting the Skin folder, then enter the fileManager, if you are not the latest version of FCKEDITOR, here a folder Browser, the new version has a UPLOAD folder. One comes, first enters FileManager / Browser / Default / Connectors / under, because I use the ASP, so all delete except the ASP folder. Then enter FileManager / UPLOAD / under, similarly, leaving only the ASP folder, to this, the editor is over, then, we set the editor to modify.

-------------------------------------------------- ------------------------------ The first modified file is also the FCKEDITOR total configuration file, located in the root directory FCKCONFIG .js file. Please do according to the list below (with the fckeditor version 2.0 for this): Find the 20th row fckconfig.defaultlanguage = 'en'; change to fckconfig.defaultlanguage = 'zh-cn'; set the default language to find the 40th line for Simplified Chinese FCKCONFIG.TABSPACES = 0; change to fckconfig.tabspaces = 1; that is, the Tab key can be used in the editor domain. If your editor is still in front desk at the website, for example, when you use it for a message or a diary reply, then you have to consider safe, don't use the default Toolbar in the front desk, or customize the function, or Basic that has been defined with the system, which is the basic Toolbar, find the line fckconfig.toolbarsets ["Basic"] = [['bold', 'italic', '-', 'OrderedList', 'unorderedList', ' ', / *' Link ', * /' unlink ',', ',' TEXTCOLOR ',' BGCOLOR ',' - ',' Smiley ',' Specialchar ',' Replace ', 'Preview']]; This is the Basic I have changed, remove the image function, remove the added link function, because the image and links and the flash and image buttons add function to access the front page directly to the file, if it does not change Give you a Trojan directly, don't have it? But light does not work, Fckeditor also supports the right mouse button in the editing domain. Find the 73rd line fckconfig.contextMenu = ['generic', / * 'link', * / ', / *' image ', * /' flash ',' select ',' Textarea ',' CheckBox ',' Radio ',' Textfield ',' Hiddenfield ', / *' ImageButton ', * /' Button ',' BulletedList ',' NumberedList ',' Tablecell ',' Table ',' Form ']; this is also what I changed. The "Link, Image, Flash, Image Buttons" function of the right mouse button is removed.

Found 77th line fckconfig.fontnames = 'arial; comic Sans MS; Courier New; Tahoma; Times New Roman; Verdana'; plus several common font fckconfig.fontnames = 'Song; black body; Lishu; 体 _GB2312; Arial; comic sans ms; group new roman; verdana; next to set up uploading, or asp, in fact, the FCK default is ASP, put all the following items below 100 All the code is all deleted, then all the following has the following: Type = XX after Browser.html and UPLOAD.ASP? Type = XX is changed to Type = YY, where YY is the folder name for you to save the file. And if you want to use your emoticon icon, then you jump to 131 line, change the folder address of that expression icon, and the file name of the following expression icon, then the three numbers below are the number of expressions per line. The width and high of the pop-up window, this size is based on the size of the window arranged in your expression icon. OK, the total configuration file has ended. -------------------------------------------------- ------------------------------ Next is the setting of the editor location, my habit is to put Editor under the root directory The five files that are the most beginning are also placed in the root directory (TIPS: Recommended in the root directory, and the setup path is recommended when using the path, such as "/ fckeditor /", and my habit setting is "/"), Which is conducive to the update upgrade of Fckeditor, and all folders under the site can be invoified, and there is no other folder name to change and elsewhere. Open the fckeditor.asp file, find sbasepath = "/ fckeditor /" to change to SBasePath = "/" Open the fckeditor.js file, find this.basepath = '/ fckeditor /'; change to this.basepath = '/'; editor The default display font within the domain is 12px, and my homepage default font is 14px, so it is very uncomfortable. If you want to modify, you can reach the requirements by modifying the style sheet, open /Editor/css/fck_editorarea.css, put the fourth The row is changed to font-size: 14px; Next is the setting of the upload file, this is more troublesome, please worry carefully. Open /Editor/filemanager/Browser/default/frmresourceType.html, find line 15, insert "['UPLOADFILE', 'UPLOADFILE']," The settings you just in fckconfig.js were set, then my upload file path is / uploadfile, of course, you can also change to the folder you want, but the name here must be unanimously line with YY in the "Type = YY" in fckconfig.js.

Haven't finished it, continue to enter Editor / FileManager / Browser / Default / Connector / ASP, open config.asp, first change configisenabled = false to configisenabled = true, or not upload file, then put configuserfilespath = "/ userfile" Change into configuserfilespath = "/" I want. Followed by "Set ConfigDeniedExtensions = CreateObject (" Scripting.Dictionary ")" was added back ConfigAllowedExtensions.Add "uploadfile", "" ConfigDeniedExtensions.Add "uploadfile", "" Similarly, there is also provided above and to the inside fckconfig.js corresponding. There is also an upload, it is to upload, this function is in FcKeditor 2.0, the previous version does not have this feature. Enter / editor / filemanager / upload / asp, also open config.asp, and also set configisenabled = false to configisenabled = true, I will change configUserfilespath = "/ userfiles /" to the configuserfilespath = "/ UploadFile / "& Year (Date ()) &" - ​​"" Because my upload file is placed under the UPLoadFile folder and is put on a monthly basis. Quick upload, will not let you choose a folder, but through the settings here, if you don't work with the previous settings, your file will be uploaded, you will be messy, it is very inconvenient to manage. The operation in the previous config.asp is repeated, add configallowedextensions.add "UploadFile", "", ",", "------------------------------------------------------------------ -------------------------------------------------- -------------- Next, let's talk about how to create your own online editor, here as an example of ASP and JS, ASP version code, generally used for background operations: