Will Skype be paid
Due to the recent acquisition by Microsoft of the most famous in the world, the most popular Skype web-telephony system, experts are now beginning to express some concerns that such…

Continue reading →

Google personalization
The idea was in the air, or rather, the idea was already known. Make the start page (the one with which you start your surfing or browsing the Internet) individual.…

Continue reading →

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…

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

The functionality of a modern Internet resource is optimized for the client’s tasks, and the design and content are optimized for the characteristics of the target audience. All these integral…


Search engine marketing is ruining startups
What is website marketing? In 99% of cases, the first thing that comes to mind is SEM, that is, search marketing, largely due to the similarity of terms. However, this…


Youth dependence on social networks
The Internet in the modern information world has firmly entered our lives. The advantages of this communication method are indisputable. Most popular with Internet users have won all sorts of…


Viral marketing on the Internet
Internet marketing has many different tools for increasing sales of goods or services. Some of them are legal, others are not. And there are advertising methods that balance on the…