CREATION OF SPECIALIZED SITES
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,…

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…

Continue reading →

HOW TO CREATE A SITE DEVELOPMENT PLAN?
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…

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>
<Html>
<! [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

Runet: portrait in & nb p; Rax-interior
At one time, it was widely believed in RuNet that counters are one of the most powerful tools for site promotion. More precisely, not the counters themselves, but the ratings…

...

Types and archetypes
Serious name, is not it? That of psychology or archeology ... In fact, I want to again touch on the psychology of perception regarding our design attempts, or more precisely,…

...

Is copywriting a worthy source of income?
Many people do not think about why they get up at the same time every day and how robots go to work. I’m sure that 70% of the population do…

...

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.…

...