GIF89a;
Direktori : /home/serb/public_html/fckeditor/_docs/contents/ |
Current File : /home/serb/public_html/fckeditor/_docs/contents/012.html |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- * FCKeditor - The text editor for internet * Copyright (C) 2003-2004 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * Version: 2.0 RC3 * Modified: 2005-02-17 13:30:10 --> <html> <head> <title>FCKeditor - Configuration File</title> <style> .ConfigTable TD { padding-top: 15px } .ConfigTable UL { margin-top: 0px; margin-bottom: 0px } .ConfigTable OL { margin-top: 0px; margin-bottom: 0px } </style> </head> <body> <h1>Configurations File</h1> <p>The editor comes with a rich set of configurations that makes it possible to customize its appearance, features and behaviors. The main configuration file is named "<strong>fckconfig.js</strong>".</p> <p>You can edit the main configuration file or override just your required configurations in a separated file. Javascript syntax is used to set the configurations.</p> <h3>Overriding the Default Configurations</h3> <p>To make it easier to make future updates of FCKeditor over your sites, the best approach is to put all your configurations in a separated file, outside the editor's package directory structure. In this way, you just need to overwrite the editor's directory to update it to a newer version.</p> <p>For example, suppose you want to force FCKeditor to always use the French language for its interface. To do so, you just need to create a file called, for example, "myconfig.js" and put it in the root directory of the site (or wherever you want). Inside the file you just write the following lines:</p> <p><code>FCKConfig.AutoDetectLanguage = <strong>false</strong> ;<br> FCKConfig.DefaultLanguage = '<strong>fr</strong>' ;</code> </p> <p>Now we have to tell the editor that it has to load my custom configurations. The first way to do that is changing the following line in the main configuration file (fckconfig.js):</p> <p><code>FCKConfig.CustomConfigurationsPath = '<strong>/myconfig.js</strong>' ;<br> </code> </p> <p>The above method is good, but, as you can imagine, you loose the facility to not touch the original files. In any case it is easier to remember that you just need to change one line, and all the other things remain separated.</p> <p>There is a even better way to have the same results described above, but without touching the fckconfig.js file. You can set the custom configurations path from the page that uses the editor. For example, with Javascript, you could do something like this:</p> <p><code>var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;<br> <strong>oFCKeditor.Config['CustomConfigurationsPath'] = '/myconfig.js' ;</strong><br> oFCKeditor.Create() ;<br> </code> </p> <p>The same method can be used with your preferred server side language. Take a look at the samples to find out how to manipulate the configurations by code.</p> <p>When overriding configurations, the following steps are done:</p> <ol> <ol> <li> The configurations in the main configuration file (fckconfig.js) are loaded. <li> The configurations are overridden by that ones available in the custom configuration file (if provided). <li> The configurations are overridden by that one set in the editor page (if provided), except for the "CustomConfigurationsPath", that is set after step 1.</li></ol> </OL> <p><strong>Important: remember to reset your browser cache when doing changes to the configurations file, otherwise you may not see your changes.</strong></p> <h3>Configurations Options</h3> <p>The following list describes all possible configurations found in the fckconfig.js file:</p> <table cellspacing="5" cellpadding="0" width="90%" border="0" align="center" class="ConfigTable"> <tr> <td valign="top"><strong>AutoDetectLanguage<br> </strong>(true / false)</td> <td valign="top">When set to "true", tells the editor to automatically detect the user language preferences to adapt its interface language.<br> With Internet Explorer, the language configured in the Windows Control Panel is used.<br> With Firefox, the browser language is used.</td> </tr> <tr> <td valign="top"><strong> BaseHref<br> </strong>(string)</td> <td valign="top"> Base URL used to resolve links (on images, links, styles, etc.).<br> For example, if BaseHref is set to 'http://www.fredck.com', an image that points to "/images/Logo.gif" will be interpreted by the editor as "http://www.fredck.com/images/Logo.gif", without touching the "src" attribute of the image.</td> </tr> <tr> <td valign="top"><strong> ContentLangDirection<br> </strong>('ltr' / 'rtl')</td> <td valign="top"> Sets the direction of the editor area contents. The possible values are: <ul> <li> ltr - Left to Right <li> rtl - Right to Left</li></ul> </td> </tr> <tr> <td valign="top"> <strong>ContextMenu<br> </strong>(string array)</td> <td valign="top"> Sets the list of active options in the context menu.<br> </td> </tr> <tr> <td valign="top"> <strong>CustomConfigurationsPath<br> </strong>(string)</td> <td valign="top"> Sets the path of a custom file that can override some configurations. Leave it empty to ignore.<br> It is recommended to use absolute paths (starting with /), like "/myfckconfig.js".</td> </tr> <tr> <td valign="top"> <strong>Debug<br> </strong>(true / false)</td> <td valign="top"> Enables the debug window to be shown when calling the FCKDebug.Output() function.</td> </tr> <tr> <td valign="top"> <strong>DefaultLanguage<br> </strong>(string)</td> <td valign="top"> Sets the default language used for the editor's interface localization.<br> The default language is used when the AutoDetectLanguage options is disabled or when the user language is not available.</td> </tr> <tr> <td valign="top"> <strong>EditorAreaCSS<br> </strong>(string)</td> <td valign="top"> Set the CSS styles file to be used in the editing area. In this way you can point to a file that reflects your web site styles.</td> </tr> <tr> <td valign="top"> <strong>EnableSourceXHTML<br> </strong>(true / false)</td> <td valign="top"> When set to "true", tells the editor to process the HTML source to XHTML when switching from WYSIWYG to Source view.</td> </tr> <tr> <td valign="top"> <strong>EnableXHTML<br> </strong>(true / false)</td> <td valign="top"> When set to "true", tells the editor to process the HTML source to XHTML on form post.</td> </tr> <tr> <td valign="top"> <strong>FillEmptyBlocks<br> </strong>(true / false)</td> <td valign="top"> When set to "true", block elements (like P, DIV, H1, PRE, etc...) are forced to have content (a &nbsp;).<br> Empty blocks are "collapsed" by while browsing, so a empty <p></p> is not visible. While editing, the editor "expand" empty blocks so you can insert content inside then. Setting this option to "true" results useful to reflect the same output when browsing and editing.</td> </tr> <tr> <td valign="top"> <strong>FontColors<br> </strong>(string)</td> <td valign="top"> Sets the colors that must be shown in the colors panels (in the toolbar).</td> </tr> <tr> <td valign="top"> <strong>FontFormats<br> </strong>(string)</td> <td valign="top"> Sets the list of formats to be shown in the "Format" toolbar command.</td> </tr> <tr> <td valign="top"> <strong>FontNames<br> </strong>(string)</td> <td valign="top"> Sets the list of fonts to be shown in the "Font" toolbar command.</td> </tr> <tr> <td valign="top"> <strong>FontSizes<br> </strong>(string)</td> <td valign="top"> Sets the list of font sizes to be shown in the "Size" toolbar command.</td> </tr> <tr> <td valign="top"> <strong>ForcePasteAsPlainText<br> </strong>(true / false)</td> <td valign="top"> When set to "true", converts the clipboard contents to pure text on pasting operations.</td> </tr> <tr> <td valign="top"> <strong>ForceSimpleAmpersand<br> </strong>(true / false)</td> <td valign="top"> When set to "true", on XHTML processing, forces the ampersands (&) on tags attributes to not be converted to "&amp;". This conversion is a W3C requirement for XHTML, so it is recommended to leave this option to "false".</td> </tr> <tr> <td valign="top"> <strong>FormatIndentator<br> </strong>(string)</td> <td valign="top"> Sets the characters to be used when indenting the HTML source when formatting it. Useful values are a sequence of spaces (' ') or a tab char ('\t').</td> </tr> <tr> <td valign="top"> <strong>FormatOutput<br> </strong>(true / false)</td> <td valign="top"> When set to "true", the output HTML generated by the editor will be processed and formatted.</td> </tr> <tr> <td valign="top"> <strong>FormatSource<br> </strong>(true / false)</td> <td valign="top"> When set to "true", the HTML shown by the editor, while switching from WYSIWYG to Source views, will be processed and formatted.</td> </tr> <tr> <td valign="top"> <strong>FullPage<br> </strong>(true / false)</td> <td valign="top"> When set to "true", enables full page editing (from <HTML> to </HTML>). It also enables the "Page Properties" toolbar button.</td> </tr> <tr> <td valign="top"> <strong>GeckoUseSPAN<br> </strong>(true / false)</td> <td valign="top"> When set to "true", tells Gecko browsers to use SPAN instead of <B>. <I> and <U> for bold, italic an underline.</td> </tr> <tr> <td valign="top"> <strong>IeSpellDownloadUrl<br> </strong>(string)</td> <td valign="top"> Points the editor to the URL used to download the ieSpell program setup.</td> </tr> <tr> <td valign="top"> <strong>ImageBrowser<br> </strong>(true / false)</td> <td valign="top"> If set to "true", the "Browse Server" button is visible in the "Image" dialog window.</td> </tr> <tr> <td valign="top"> <strong>ImageBrowserURL<br> </strong>(string)</td> <td valign="top"> Sets the URL of the page called when the user clicks the "Browse Server" button in the "Image" dialog window.<br> In this way, you can create your custom Image Browser that is well integrated with your system.</td> </tr> <tr> <td valign="top"> <strong>ImageBrowserWindowHeight<br> </strong>(number)</td> <td valign="top"> Sets the height, in pixels, of the "Image Browser" window (shown when the "Browse Server" button is clicked in the Image dialog window.</td> </tr> <tr> <td valign="top"> <strong>ImageBrowserWindowWidth<br> </strong>(number)</td> <td valign="top"> Sets the width, in pixels, of the "Image Browser" window (shown when the "Browse Server" button is clicked in the Image dialog window.</td> </tr> <tr> <td valign="top"> <strong>LinkBrowser<br> </strong>(true / false)</td> <td valign="top"> If set to "true", the "Browse Server" button is visible in the "Link" dialog window.</td> </tr> <tr> <td valign="top"> <strong>LinkBrowserURL<br> </strong>(string)</td> <td valign="top"> Sets the URL of the page called when the user clicks the "Browse Server" button in the "Link" dialog window.<br> In this way, you can create your custom File Browser that is well integrated with your system.</td> </tr> <tr> <td valign="top"> <strong>LinkBrowserWindowHeight<br> </strong>(number)</td> <td valign="top"> Sets the height, in pixels, of the "File Browser" window (shown when the "Browse Server" button is clicked in the Link dialog window.</td> </tr> <tr> <td valign="top"> <strong>LinkBrowserWindowWidth<br> </strong>(number)</td> <td valign="top"> Sets the height, in pixels, of the "File Browser" window (shown when the "Browse Server" button is clicked in the Link dialog window.</td> </tr> <tr> <td valign="top"> <strong>Plugins<br> </strong>(object)</td> <td valign="top"> With this object you can register the plugins to be loaded by the editor calling it "Add()" function.</td> </tr> <tr> <td valign="top"> <strong>PluginsPath<br> </strong>(string)</td> <td valign="top"> Sets the base path used when looking for registered plugins.</td> </tr> <tr> <td valign="top"> <strong>ShowBorders<br> </strong>(true / false)</td> <td valign="top"> When set to "true", show "fake" table and cells borders on table that has the border attribute set to zero.</td> </tr> <tr> <td valign="top"> <strong>SkinPath<br> </strong>(string)</td> <td valign="top"> Sets the path to the skin (graphical interface settings) to be used by the editor.</td> </tr> <tr> <td valign="top"> <strong>SmileyColumns<br> </strong>(number)</td> <td valign="top"> Sets the number of columns to be shown in the "Smiley" dialog window.</td> </tr> <tr> <td valign="top"> <strong>SmileyImages<br> </strong>(string array)</td> <td valign="top"> Sets the list of images to available in the "Smiley" dialog window.</td> </tr> <tr> <td valign="top"> <strong>SmileyPath<br> </strong>(string)</td> <td valign="top"> Sets the base path for the smiles images.</td> </tr> <tr> <td valign="top"> <strong>SmileyWindowHeight<br> </strong>(number)</td> <td valign="top"> Sets the height, in pixels, of the "Smiley" dialog window.</td> </tr> <tr> <td valign="top"> <strong>SmileyWindowWidth<br> </strong>(number)</td> <td valign="top"> Sets the width, in pixels, of the "Smiley" dialog window.</td> </tr> <tr> <td valign="top"> <strong>SpellChecker<br> </strong>('ieSpell' / 'SpellerPages')</td> <td valign="top"> Sets the spell checker to be used on spell checking operations. For more info, <a href="011.html"> click here</a>.</td> </tr> <tr> <td valign="top"> <strong>StartupFocus<br> </strong>(true / false)</td> <td valign="top"> When set to "true", forces the editor to get the keyboard input focus on startup (page load).</td> </tr> <tr> <td valign="top"> <strong>StylesXmlPath<br> </strong>(string)</td> <td valign="top"> Sets the path to the XML file that has the definitions and rules of the styles used by the "Style" toolbar command. For more info, <a href="006.html">click here</a>.</td> </tr> <tr> <td valign="top"> <strong>TabSpaces<br> </strong>(number)</td> <td valign="top"> Set the number of spaces (&nbsp;) to be inserted when the user hits the "tab" key.<br> This is an Internet Explorer only feature. Other browsers insert spaces automatically by default.</td> </tr> <tr> <td valign="top"> <strong>ToolbarCanCollapse<br> </strong>(true / false)</td> <td valign="top"> When set to "true", tells the editor that the toolbar can be Collapsed/Expanded by the user when clicking the vertical bar placed on the left of it (on the right for "rtl" languages).</td> </tr> <tr> <td valign="top"> <strong>ToolbarSets<br> </strong>(object)</td> <td valign="top"> With this object you can define which items to be shown in the toolbar. You can define more than one toolbar in the configuration file.<br> </td> </tr> <tr> <td valign="top"> <strong>ToolbarStartExpanded<br> </strong>(true / false)</td> <td valign="top"> When set to "true", the toolbar is Expanded on startup, otherwise it is Collapsed and the user must click on it to show it.</td> </tr> <tr> <td valign="top"> <strong>UseBROnCarriageReturn<br> </strong>(true / false)</td> <td valign="top"> When set to "true", inserts a <BR> tag when the user hits the "enter" key, instead of starting a new paragraph (<P> or <DIV>).<br> This is an Internet Explorer only feature. Other browsers insert the <BR> tag by default.</td> </tr> </table> </body> </html>