Comparison of virtual hosting and dedicated server
The Internet is a powerful platform for maintaining and promoting any business. In order to make the site’s presence on the network permanent, it is necessary to find and determine…

Continue reading →

Many site owners, after the web project is fully ready, refuse the services of development companies and prefer to independently manage the project. Of course, this requires at least a…

Continue reading →

How to evaluate the effectiveness of contextual advertising and website promotion? The best way, of course, depending on the goals set for the site, is to count the number of…

Continue reading →

Customize FCKEditor yourself

The advantages of FCKEditor – open source, support and constant updates from the company-developer, the presence of an active community and multiplatform – brought him among the leaders among similar systems. FCKEditor is not a CMS tool in the usual sense of the term. Rather, it is a convenient designer, focused primarily on the creation of a convenient and functional client side of the site editor. The main features of FCKEditor are described in the previous article. All of them are available by default.

It is enough to download the archive of the current version and install it on your computer. But, like most open source solutions, FCKEditor can be modified to suit your requirements.
Editor Setup

Editor FCKEditor built on a multi-tier object model. The work files are located in the / edit / folder and are called fckeditor. Extension. For example, a file that implements an editor entirely on the client side is called fckeditor.js; ASP – fckeditor.asp; PHP – fckeditor.php and so on. The file contains a class that creates an instance of the editor object (FCKeditor), and a set of utility functions. So, FCKeditor_IsCompatibleBrowser determines the type of browser on the client and calls the appropriate class to implement the scripts. FCKeditor.prototype._HTMLEncode replaces invalid characters (angle brackets, quotes), and the list of autochange can be updated by the developer. A similar function in the ASP version is called ReplaceText. The main difference between versions for PHP, ASP, CFM from the basic version for Javascript is the implementation of the functionality not on the client, but on the server. The very same composition of functionality is unchanged.

The FCKEditor object model is implemented as a set of javascript files. Their list and the paths to them are specified in the fckpackager.xml file. If you create your class in a separate file, do not forget to include the path to it in this way: <File path = “editor / _source / fckconstants.js” />. Please note that for different types of browsers a custom object model is formed. The basic parameters of the editor, including the menu bar, are configured in the fckconfig.js file. One of the groups includes settings for the appearance of the editor: display of borders, pop-up windows, prompts. The ToolbarSets property sets the list of items in the editor menu panel:

FCKConfig.ToolbarSets [“Default”] = [
[“Source”, “DocProps”, “-“, “Save”, “NewPage”, “Preview”, “-“, “Templates”],
[“Cut”, “Copy”, “Paste”, “PasteText”, “PasteWord”, “-“, “Print”, “SpellCheck”],
[“Undo”, “Redo”, “-“, “Find”, “Replace”, “-“, “SelectAll”, “RemoveFormat”],
[“Form”, “Checkbox”, “Radio”, “TextField”, “Textarea”, “Select”, “Button”, “ImageButton”, “HiddenField”],
[“Bold”, “Italic”, “Underline”, “StrikeThrough”, “-“, “Subscript”, “Superscript”],
[“OrderedList”, “UnorderedList”, “-“, “Outdent”, “Indent”],
[“JustifyLeft”, “JustifyCenter”, “JustifyRight”, “JustifyFull”],
[“Link”, “Unlink”, “Anchor”],
[“Image”, “Flash”, “Table”, “Rule”, “Smiley”, “SpecialChar”, “PageBreak”],
[“Style”, “FontFormat”, “FontName”, “FontSize”],
[“TextColor”, “BGColor”],
[“FitWindow”, “-“, “About”]

Fig. 1. The composition of the default menu
The example above shows the default menu bar configuration. The composition of the available user functions can be viewed in Fig. 1. By adding or deleting values ​​in the list, we customize the menu bar in accordance with the requirements of our design.

Customize your own styles

Descriptions of the styles of the menu bar (Fig. 1) are in the fckstyles.xml file. Fragments of the description of the various styles of text design are given below.

<style name = “Custom Bold” element = “span”>
<attribute name = “style” value = “font-weight: bold;” />
</ style>

The above fragment sets the bold font, which is used when choosing bold from the Font Type drop-down list in the menu bar. The basic settings are bold, italic and underlined. By creating a similar node, you can specify any other font layout: strikethrough, index, underlined, and so on. Similarly, nodes are created to decorate other panels in the editor menu: graphics, font size, headings.

The fcktemplates.xml file contains webpage structure templates. The default document contains three templates: “Heading with a picture”, “Strange template”, containing the heading in the left and the main text in the right margin, and “Table layout of the page”. The template is formed in CDATA, as shown for the “Header with Picture” template:

<Template title = “Image and Title” image = “template1.gif”>
<Description> This is the main image. </ Description>
<! [CDATA [
<img style = “margin-right: 10px” height = “100” alt = “” width = “100” align = “left” />
<h3> Type the title here </ h3>
Type the text here
</ Html>
</ Template>

By creating your own templates, you can significantly speed up site development and reduce the number of errors through the use of standard structures. Since you create the templates yourself, then

Our many years of experience shows that having a site creation plan significantly reduces the time required to implement, test and launch a project. This allows you to optimize the…


Customize FCKEditor yourself
The advantages of FCKEditor - open source, support and constant updates from the company-developer, the presence of an active community and multiplatform - brought him among the leaders among similar…


The website is a series of interrelated web pages. Whether creating a news site is, or, for example, creating a construction site, they all have the same structure. In particular,…


How to promote a website for free
Perhaps, without exception, novice webmasters, before creating a site, first think about its promotion. After all, there is a stereotype that it is necessary to invest money to promote an…