<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://docs-old.ckeditor.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fredck</id>
		<title>CKSource Docs - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://docs-old.ckeditor.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fredck"/>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/Special:Contributions/Fredck"/>
		<updated>2026-05-17T23:56:56Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.29.1</generator>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=Template:CKEditor_Docs_FrontPage&amp;diff=7218</id>
		<title>Template:CKEditor Docs FrontPage</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=Template:CKEditor_Docs_FrontPage&amp;diff=7218"/>
				<updated>2012-11-27T12:37:14Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://a.cksource.com/e/1/img/logo-ckeditor-h100.png&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;introText&amp;quot;&amp;gt;Bring rich editor features to your products and websites, providing your users with powerful tools to make creating Web content easier than ever and accessible to anyone.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;homeMainDoc&amp;quot;&amp;gt;[http://docs.ckeditor.com/ CKEditor 4 Documentation Website]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;homeMainDoc&amp;quot;&amp;gt;[[CKEditor 3.x/Developers Guide|CKEditor 3 Developer's Guide]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;homeMainDoc&amp;quot;&amp;gt;[[CKEditor_3.x/Users_Guide|CKEditor 3 User's Guide]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;homeMainDoc&amp;quot;&amp;gt;[[CKEditor_3.x/Howto|CKEditor 3 HOWTOs]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;homeMainDoc&amp;quot;&amp;gt;[[CKEditor_3.x/Tutorials|CKEditor 3 Tutorials]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;homeMainDoc&amp;quot;&amp;gt;[[CKEditor 3.x/Accessibility Compliance|CKEditor 3 Accessibility Compliance]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;homeDoc&amp;quot;&amp;gt;[[FCKeditor 2.x/Developers Guide|FCKeditor 2 Developer's Guide]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;homeDoc&amp;quot;&amp;gt;[[FCKeditor 2.x/Users Guide|FCKeditor 2 User's Guide]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;homeSite&amp;quot;&amp;gt;[http://ckeditor.com/ CKEditor Web Site]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=Template:CKEditor_Docs_FrontPage&amp;diff=7217</id>
		<title>Template:CKEditor Docs FrontPage</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=Template:CKEditor_Docs_FrontPage&amp;diff=7217"/>
				<updated>2012-11-27T12:36:42Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://a.cksource.com/e/1/img/logo-ckeditor-h100.png&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;introText&amp;quot;&amp;gt;Bring rich editor features to your products and websites, providing your users with powerful tools to make creating Web content easier than ever and accessible to anyone.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;homeMainDoc&amp;quot;&amp;gt;[[http://docs.ckeditor.com/|CKEditor 4 Documentation Website]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;homeMainDoc&amp;quot;&amp;gt;[[CKEditor 3.x/Developers Guide|CKEditor 3 Developer's Guide]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;homeMainDoc&amp;quot;&amp;gt;[[CKEditor_3.x/Users_Guide|CKEditor 3 User's Guide]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;homeMainDoc&amp;quot;&amp;gt;[[CKEditor_3.x/Howto|CKEditor 3 HOWTOs]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;homeMainDoc&amp;quot;&amp;gt;[[CKEditor_3.x/Tutorials|CKEditor 3 Tutorials]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;homeMainDoc&amp;quot;&amp;gt;[[CKEditor 3.x/Accessibility Compliance|CKEditor 3 Accessibility Compliance]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;homeDoc&amp;quot;&amp;gt;[[FCKeditor 2.x/Developers Guide|FCKeditor 2 Developer's Guide]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;homeDoc&amp;quot;&amp;gt;[[FCKeditor 2.x/Users Guide|FCKeditor 2 User's Guide]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li class=&amp;quot;homeSite&amp;quot;&amp;gt;[http://ckeditor.com/ CKEditor Web Site]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Build&amp;diff=7193</id>
		<title>CKEditor 4.x/Skin SDK/Build</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Build&amp;diff=7193"/>
				<updated>2012-07-26T16:35:18Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Created page with &amp;quot;{{#CUSTOMTITLE:Building and Releasing Your Skin}} So far, you've worked on the &amp;quot;source version&amp;quot; of your skin. Now that your skin is perfect as you wanted, it is time to prepar...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:Building and Releasing Your Skin}}&lt;br /&gt;
So far, you've worked on the &amp;quot;source version&amp;quot; of your skin. Now that your skin is perfect as you wanted, it is time to prepare it to be used in production websites.&lt;br /&gt;
&lt;br /&gt;
To do so you'll need CKBuilder a Java application that makes this magic happen. It can be downloaded here:&amp;lt;br/&amp;gt;&lt;br /&gt;
http://download.cksource.com/ckbuilder/ckbuilder.jar &amp;lt;strong style=&amp;quot;color:red&amp;quot;&amp;gt;[TODO: Fix this URL]&amp;lt;/strong&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[http://java.com/en/download/ Java] must be available on your command line. To run the builder, simply copy &amp;lt;code&amp;gt;ckbuilder.jar&amp;lt;/code&amp;gt; into the &amp;lt;code&amp;gt;skins&amp;lt;/code&amp;gt; folder of CKEditor (where your skin custom folder is available) and execute this command:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; java -jar ckbuilder.jar --build-skin myskin myskin-release&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;myskin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;myskin-release&amp;lt;/code&amp;gt; parts are your skin folder name and the destination folder name. Just use the names you prefer.&lt;br /&gt;
&lt;br /&gt;
This is the job done by CKBuilder on your skin:&lt;br /&gt;
&lt;br /&gt;
* Merges all CSS files parts. This means that all CSS files having &amp;lt;code&amp;gt;@import&amp;lt;/code&amp;gt; entries will have their imported files in-lined, having just one file available.&lt;br /&gt;
* Minifies CSS and JavaScript files, reducing their size to optimize the download speed.&lt;br /&gt;
* Generates a single &amp;quot;strip image&amp;quot; containing all icons provided by the skin.&lt;br /&gt;
* Removes all unnecessary files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You skin is ready. The release version is the one to use on your websites or to distribute to others, while the source version can be shared to the world through services like [http://github.com/ GitHub].&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Test&amp;diff=7192</id>
		<title>CKEditor 4.x/Skin SDK/Test</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Test&amp;diff=7192"/>
				<updated>2012-07-26T16:27:27Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Created page with &amp;quot;{{#CUSTOMTITLE:Testing and Shaping It Up}} Once you have your skin working in the way you want in one browser, it is time to test it on others. For that, just open a CKEditor ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:Testing and Shaping It Up}}&lt;br /&gt;
Once you have your skin working in the way you want in one browser, it is time to test it on others. For that, just open a CKEditor sample with your skin on other browsers. Check out the CKSource GBS for the list of browsers supported by CKEditor.&lt;br /&gt;
&lt;br /&gt;
Other things to test among all browsers are:&lt;br /&gt;
&lt;br /&gt;
* Add &amp;lt;code&amp;gt;config.language='he';&amp;lt;/code&amp;gt; to the CKEditor config.js file to load the editor in Hebrew and see the editor in RTL.&lt;br /&gt;
* Enable High Contrast on Windows (&amp;lt;code&amp;gt;SHIFT+ALT+PRINT-SCREEN&amp;lt;/code&amp;gt;) and reload the page.&lt;br /&gt;
* Play with the the UI Color sample to check the chameleon feature.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Customize&amp;diff=7191</id>
		<title>CKEditor 4.x/Skin SDK/Customize</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Customize&amp;diff=7191"/>
				<updated>2012-07-26T16:25:20Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:Bringing Your Skin to Life}}&lt;br /&gt;
At this stage you have a started a skin that is eventually identical to the existing one you have chosen. Now it is time to bring your ideas to life, by making changes to the skin files.&lt;br /&gt;
&lt;br /&gt;
The bad part of basing your work on an existing skin is the tendency of making both skins too similar. Or to reuse many of the solutions proposed on the base skin. Because of this, try to see your skin with different eyes and keep in mind that you can change it drastically if you want, having something that has nothing to do with the original skin.&lt;br /&gt;
&lt;br /&gt;
To start, it is recommended opening all files in the skin folder and understanding their scope and contents. The Kama skin is fully documented, so its files are the best learning resources for in-depth technical aspects.&lt;br /&gt;
&lt;br /&gt;
Skin developers have powerful tools available, which make it easy to work on CSS files. The most important tool is the &amp;quot;elements inspector&amp;quot;, available in applications like [http://getfirebug.com/ Firebug] (for Firefox), [http://www.opera.com/dragonfly/ Opera Dragonfly] or the [https://developers.google.com/chrome-developer-tools/ Google Chrome Developer Tools]. With this tools you can change or add CSS style rules to elements and see the results on the fly. Then just port the changes to the CSS files. We strongly recommend this approach.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Customize&amp;diff=7190</id>
		<title>CKEditor 4.x/Skin SDK/Customize</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Customize&amp;diff=7190"/>
				<updated>2012-07-26T16:21:56Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Created page with &amp;quot;{{#CUSTOMTITLE:Bringing Your Skin to Life}} At this stage you have a started a skin that is eventually identical to the existing one you have chosen. Now it is time to bring y...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:Bringing Your Skin to Life}}&lt;br /&gt;
At this stage you have a started a skin that is eventually identical to the existing one you have chosen. Now it is time to bring your ideas to life, by making changes to the skin files.&lt;br /&gt;
&lt;br /&gt;
The bad part of basing your work on an existing skin is the tendency of making both skins too similar. Or to reuse many of the solutions proposed on the base skin. Because of this, try to see your skin with different eyes and keep in mind that you can change it drastically if you want, having something that has nothing to do with the original skin.&lt;br /&gt;
&lt;br /&gt;
To start, it is recommended opening all files in the skin folder and understanding their scope and contents. The Kama skin is fully documented, so its files are the best learning resources for in-depth technical aspects.&lt;br /&gt;
&lt;br /&gt;
Skin developers have powerful tools available, which make it easy to work on CSS files. The most important tool is the &amp;quot;elements inspector&amp;quot;, available in applications like Firebug (Firefox), Opera Dragonfly or the Developer Tools of Google Chrome. With this tools you can change or add CSS style rules to elements and see the results on the fly. Then just port the changes to the CSS files. We strongly recommend this approach.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Setup&amp;diff=7189</id>
		<title>CKEditor 4.x/Skin SDK/Setup</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Setup&amp;diff=7189"/>
				<updated>2012-07-26T16:20:16Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Created page with &amp;quot;{{#CUSTOMTITLE:Setting It Up to Start a Custom Skin}} The starting point of developing a skin is choosing an existing skin to base your work on. Starting a skin from scratch i...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:Setting It Up to Start a Custom Skin}}&lt;br /&gt;
The starting point of developing a skin is choosing an existing skin to base your work on. Starting a skin from scratch is possible, but it is a lot of work. Actually, it is up to the skin developer to decide the road to take, but generally existing skins are good enough. We recommend the default [[CKEditor_4.x/Skin_SDK/Introduction|Kama skin]] as the basis, because it is actively maintained and includes all possible features a skin can have.&lt;br /&gt;
&lt;br /&gt;
You must have access to the &amp;quot;source files&amp;quot; of the selected skin. Distribution files are usually optimized for final use and are unreadable. Copy the source files in a folder inside the &amp;lt;code&amp;gt;skins&amp;lt;/code&amp;gt; folder of a CKEditor installation. Give the folder name the name of your new skin (lower-cased, no spaces).&lt;br /&gt;
&lt;br /&gt;
Now set the skin name in the CKEditor configuration file (&amp;lt;code&amp;gt;config.js&amp;lt;/code&amp;gt;). For example: &amp;lt;code&amp;gt;config.skin=’myskin’;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You're done, CKEditor will now start using your new skin files.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Browser_Hacks&amp;diff=7188</id>
		<title>CKEditor 4.x/Skin SDK/Browser Hacks</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Browser_Hacks&amp;diff=7188"/>
				<updated>2012-07-26T16:16:35Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Created page with &amp;quot;{{#CUSTOMTITLE:Dedicated Browser Hacks}} Skins are basically CSS styling on the DOM structure that represents the editor. Fortunately the world is going into a direction where...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:Dedicated Browser Hacks}}&lt;br /&gt;
Skins are basically CSS styling on the DOM structure that represents the editor. Fortunately the world is going into a direction where browsers are aligning their CSS features to standards, which makes it easier to design CSS that works everywhere.&lt;br /&gt;
&lt;br /&gt;
But still the world is not perfect and we have small differences on CSS among browsers. Additionally, CKEditor must support ancient browsers, which are more limited and buggy.&lt;br /&gt;
&lt;br /&gt;
To make it easier to maintain the skin CSS, CKEditor makes it possible to define browser specific files, which hold all &amp;quot;hacks&amp;quot; necessary for them. For example, a skin can contain the &amp;lt;code&amp;gt;editor_ie.css&amp;lt;/code&amp;gt; file with all IE hacks or &amp;lt;code&amp;gt;dialog_opera.css&amp;lt;/code&amp;gt; for Opera specific stuff.&lt;br /&gt;
&lt;br /&gt;
A skin must instruct CKEditor to load, for example, &amp;lt;code&amp;gt;editor_ie.css&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;editor.css&amp;lt;/code&amp;gt; on IE browsers. This must be done by setting the &amp;lt;code&amp;gt;CKEDITOR.skin.ua_editor&amp;lt;/code&amp;gt; value to the list of &amp;quot;browser files&amp;quot; available. The same can be done for &amp;lt;code&amp;gt;dialog.css&amp;lt;/code&amp;gt;. Check out the &amp;lt;code&amp;gt;skin.js&amp;lt;/code&amp;gt; file of the [[CKEditor_4.x/Skin_SDK/Introduction|Kama skin]] for a real example.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/High_Contrast&amp;diff=7187</id>
		<title>CKEditor 4.x/Skin SDK/High Contrast</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/High_Contrast&amp;diff=7187"/>
				<updated>2012-07-26T16:13:46Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Created page with &amp;quot;{{#CUSTOMTITLE:High Contrast Compatibility}} The MS Windows operating systems offers an accessibility feature called &amp;quot;High Contrast&amp;quot;, which turns the entire system UI into a t...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:High Contrast Compatibility}}&lt;br /&gt;
The MS Windows operating systems offers an accessibility feature called &amp;quot;High Contrast&amp;quot;, which turns the entire system UI into a two colors environment. This can be controlled by the user, but usual we have &amp;quot;black on white&amp;quot; or &amp;quot;white on black&amp;quot;. This feature is used by people with sight disabilities that makes it hard to identify contrast differences on object colors.&lt;br /&gt;
&lt;br /&gt;
In High Contrast, all colors go away. Most of the applications UIs because just lines and boxes holding text labels or black and white icons.&lt;br /&gt;
&lt;br /&gt;
To quickly enable High Contrast easily on Windows, just use &amp;lt;code&amp;gt;SHIFT+ALT+PRINT-SCREEN&amp;lt;/code&amp;gt;. Do that now! Additional settings can be controlled in the Windows Control Panel.&lt;br /&gt;
&lt;br /&gt;
CKEditor offers great support for High Contrast, limited to Firefox and Internet Explorer (other browsers don't support High Contrast).  When enabled, the editor is rendered as clear lines and the toolbar buttons present text labels, instead of icon images.&lt;br /&gt;
&lt;br /&gt;
Skin developers must take this in consideration and make the necessary CSS styling to support High Contrast. This can be easily done by using the &amp;lt;code&amp;gt;.cke_hc&amp;lt;/code&amp;gt; class name, which is set at the outer element of the editor UI. Usage examples can be find in the [[CKEditor_4.x/Skin_SDK/Introduction|Kama skin]] files.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/RTL&amp;diff=7186</id>
		<title>CKEditor 4.x/Skin SDK/RTL</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/RTL&amp;diff=7186"/>
				<updated>2012-07-26T16:09:14Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Created page with &amp;quot;{{#CUSTOMTITLE:Right-to-Left (RTL) Reading Direction}} Most of us are used to read text from the left side of the page to the right, just like this text in English. This sound...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:Right-to-Left (RTL) Reading Direction}}&lt;br /&gt;
Most of us are used to read text from the left side of the page to the right, just like this text in English. This sounds obvious, but on several languages used around the world this is not true. They're read starting at the right to the left. This is known as the &amp;quot;RTL&amp;quot; reading (or writing) direction.  Some of these languages are Arabic, Hebrew, Persian and Uyghur.&lt;br /&gt;
&lt;br /&gt;
On software, RTL is an important aspect and it is well supported by Operating System and their applications. CKEditor is not an exception and offers exceptional support for RTL user interfaces.&lt;br /&gt;
&lt;br /&gt;
Not that, for an application, RTL means that everything that we're used to see at one side of the screen, goes to the opposite side. If the close button is at top-right, it is move to top-left on RTL. A toolbar starts on the left, it'll then start on the right. It is like seeing the application in a mirror.&lt;br /&gt;
&lt;br /&gt;
Skin developers must take this in consideration and make the necessary CSS styling to support RTL interfaces. This can be easily done by using the &amp;lt;code&amp;gt;.cke_rtl&amp;lt;/code&amp;gt; class name, which is set at the outer element of the editor UI. Usage examples can be find in the [[CKEditor_4.x/Skin_SDK/Introduction|Kama skin]] files.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Reset&amp;diff=7185</id>
		<title>CKEditor 4.x/Skin SDK/Reset</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Reset&amp;diff=7185"/>
				<updated>2012-07-26T16:05:23Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:Reset and External CSS}}As we know, CKEditor is used inside webpages. In fact, the CKEditor UI and the skin CSS files are all loaded inside a page that is out of the editor and skin control. This means that the skin can have interference from external CSS present on the page.&lt;br /&gt;
&lt;br /&gt;
Let's suppose a site likes red links. By simply adding &amp;lt;code&amp;gt;a{color:red;}&amp;lt;/code&amp;gt; in a CSS file would be enough to make the toolbar labels or dialog tabs of the editor red.&lt;br /&gt;
&lt;br /&gt;
To workaround this problem, a skin developer must include &amp;quot;reset styles&amp;quot; that will define defaults for most of the styles that could impact on the editor interface. Check the &amp;lt;code&amp;gt;reset.css&amp;lt;/code&amp;gt; file in the [[CKEditor_4.x/Skin_SDK/Introduction|Kama skin]]. It is a useful base for it.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Chameleon&amp;diff=7184</id>
		<title>CKEditor 4.x/Skin SDK/Chameleon</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Chameleon&amp;diff=7184"/>
				<updated>2012-07-26T16:03:57Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Created page with &amp;quot;{{#CUSTOMTITLE:The &amp;quot;Chameleon&amp;quot; Feature}}One nice feature of CKEditor is its flexibility to easily match a website color scheme by simply setting the &amp;lt;code&amp;gt;config.uiColor&amp;lt;/code...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:The &amp;quot;Chameleon&amp;quot; Feature}}One nice feature of CKEditor is its flexibility to easily match a website color scheme by simply setting the &amp;lt;code&amp;gt;config.uiColor&amp;lt;/code&amp;gt; configuration option. While the Barbie site would set it to &amp;lt;code style=&amp;quot;background:#F59FC6&amp;quot;&amp;gt;#F59FC6&amp;lt;/code&amp;gt;, Ninja Turtles would prefer &amp;lt;code style=&amp;quot;background:#B1CC3D&amp;quot;&amp;gt;#B1CC3D&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The core editor API controls the input of the preferred color, but it is the skin job to tell it how to change the color. That's because the skin itself defined where and how to use colors.&lt;br /&gt;
&lt;br /&gt;
For that purpose, the &amp;lt;code&amp;gt;CKEDITOR.skin.chameleon&amp;lt;/code&amp;gt; function must be defined in the &amp;lt;code&amp;gt;skin.js&amp;lt;/code&amp;gt; file. Please check the [[CKEditor_4.x/Skin_SDK/Introduction|Kama skin]] files for full details.&lt;br /&gt;
&lt;br /&gt;
Note that adopting this feature is totally optional. A skin developer may decide to have a fixed color and not give the possibility to change it. Of course we don’t recommend this, but if that is the case, it is enough to not defined the chameleon function in the &amp;lt;code&amp;gt;skin.js&amp;lt;/code&amp;gt; file.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Reset&amp;diff=7183</id>
		<title>CKEditor 4.x/Skin SDK/Reset</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Reset&amp;diff=7183"/>
				<updated>2012-07-26T15:57:36Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Created page with &amp;quot;As we know, CKEditor is used inside webpages. In fact, the CKEditor UI and the skin CSS files are all loaded inside a page that is out of the editor and skin control. This mea...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As we know, CKEditor is used inside webpages. In fact, the CKEditor UI and the skin CSS files are all loaded inside a page that is out of the editor and skin control. This means that the skin can have interference from external CSS present on the page.&lt;br /&gt;
&lt;br /&gt;
Let's suppose a site likes red links. By simply adding &amp;lt;code&amp;gt;a{ color:red; }&amp;lt;/code&amp;gt; in a CSS file would be enough to make the toolbar labels or dialog tabs of the editor red.&lt;br /&gt;
&lt;br /&gt;
To workaround this problem, a skin developer must include &amp;quot;reset styles&amp;quot; that will define defaults for most of the styles that could impact on the editor interface. Check the &amp;lt;code&amp;gt;reset.css&amp;lt;/code&amp;gt; file in the [[CKEditor_4.x/Skin_SDK/Introduction|Kama skin]]. It is a useful base for it.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Icons&amp;diff=7182</id>
		<title>CKEditor 4.x/Skin SDK/Icons</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Icons&amp;diff=7182"/>
				<updated>2012-07-26T15:55:18Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Created page with &amp;quot;An important aspect that a skin can (optionally) customize are the icons used on the CKEditor toolbar and context menu. This is not mandatory in any way, but it makes it possi...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An important aspect that a skin can (optionally) customize are the icons used on the CKEditor toolbar and context menu. This is not mandatory in any way, but it makes it possible to precisely align the icons design with the skin lines.&lt;br /&gt;
&lt;br /&gt;
The CKEditor toolbar is filled by buttons provided by plugins. These plugins include default icons for their buttons. The skin role here is eventually overriding those icons, by providing a different version of them. This means that, if a skin icon is available for a button, it will be used, otherwise the default plugin icon is used.&lt;br /&gt;
&lt;br /&gt;
There is a huge number of plugins available for CKEditor, provided by people and companies all around the world. It is impossible for a skin developer to provide icons for every single plugin, so it is up to her to decide which icons to include.&lt;br /&gt;
&lt;br /&gt;
All skin icons must be included inside the &amp;lt;code&amp;gt;icons&amp;lt;/code&amp;gt; folder in the skin folder. The icons file name must match the name of the icon files available in the &amp;lt;code&amp;gt;icons&amp;lt;/code&amp;gt; folder of the plugins.&lt;br /&gt;
&lt;br /&gt;
If you want the source version of your skin to overload icons properly, you must inform CKEditor about the presence of your custom icons. This is optional, but if not done your icons will be visible in the release version of your skin only. Check the &amp;lt;code&amp;gt;skin.js&amp;lt;/code&amp;gt; file in the [[CKEditor_4.x/Skin_SDK/Introduction|Kama skin]] for an example.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK&amp;diff=7181</id>
		<title>CKEditor 4.x/Skin SDK</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK&amp;diff=7181"/>
				<updated>2012-07-26T15:50:39Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:CKEditor 4 Skin SDK}}The '''CKEditor 4 Skin SDK''' is the essential resource to successfully develop skins for CKEditor 4.&lt;br /&gt;
&lt;br /&gt;
== Table of Contents ==&lt;br /&gt;
&lt;br /&gt;
* [[CKEditor_4.x/Skin_SDK/Introduction|Introduction (Read me First!)]]&lt;br /&gt;
* Advanced Concepts on Skins&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/Icons|Icons]]&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/Reset|Reset and External CSS]]&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/Chameleon|The &amp;quot;Chameleon&amp;quot; Feature]]&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/RTL|Right-to-Left (RTL) Reading Direction]]&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/High Contrast|High Contrast Compatibility]]&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/Browser Hacks|Dedicated Browser Hacks]]&lt;br /&gt;
* Creating a Custom Skin&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/Setup|Set It Up]]&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/Customize|Bring Your Skin to Life]]&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/Test|Test and Shape It Up]]&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/Build|Build and Release Your Skin]]&lt;br /&gt;
* [[CKEditor_4.x/Skin_SDK/Resources|Resources and Downloads]]&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Introduction&amp;diff=7180</id>
		<title>CKEditor 4.x/Skin SDK/Introduction</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK/Introduction&amp;diff=7180"/>
				<updated>2012-07-26T15:49:48Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Created page with &amp;quot;== What is a Skin? ==  A skin is an add-on for CKEditor that makes it possible to change the look and feel of its user interface (UI). Several aspects of the UI can be customi...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What is a Skin? ==&lt;br /&gt;
&lt;br /&gt;
A skin is an add-on for CKEditor that makes it possible to change the look and feel of its user interface (UI). Several aspects of the UI can be customized by a skin, including colors, fonts, sizes, styles and icons.&lt;br /&gt;
&lt;br /&gt;
== The &amp;quot;Kama&amp;quot; Skin ==&lt;br /&gt;
&lt;br /&gt;
The '''Kama''' skin is currently the default skin of CKEditor. It is the one included on the standard CKEditor distributions. It is actively maintained by the CKEditor core developers and should be used as the starting point for the creation and maintenance of custom skins.&lt;br /&gt;
&lt;br /&gt;
== The Anatomy of a Skin ==&lt;br /&gt;
&lt;br /&gt;
A skin is, technically speaking, represented by a set of files, grouped inside a directory.&lt;br /&gt;
&lt;br /&gt;
When CKEditor is used into a website, the following skin files are loaded in the page:&lt;br /&gt;
&lt;br /&gt;
* '''skin.js''': registers the skin and makes it possible to optionally use some special skin features.&lt;br /&gt;
* '''editor.css''': contains the CSS styles used by the main editor interface.&lt;br /&gt;
* '''dialog.css''': loaded on demand, when a dialog is opened. Contains dialog specific CSS styles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Actually, the above are the minimum set of files to be downloaded, but generally several other files are used, to make the skin easier to maintain and more logically organized.&lt;br /&gt;
&lt;br /&gt;
In this document, we’ll not go on depth details about the files contents. For that, you should check the files available on the “Kama” skin. All files are well documented and are very self-descriptive.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK&amp;diff=7179</id>
		<title>CKEditor 4.x/Skin SDK</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK&amp;diff=7179"/>
				<updated>2012-07-26T15:45:48Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:CKEditor 4 Skin SDK}}The '''CKEditor 4 Skin SDK''' is the essential resource to successfully develop skins for CKEditor 4.&lt;br /&gt;
&lt;br /&gt;
== Table of Contents ==&lt;br /&gt;
&lt;br /&gt;
* [[CKEditor_4.x/Skin_SDK/Introduction|Introduction (Read me First!)]]&lt;br /&gt;
* [[CKEditor_4.x/Skin_SDK/Concepts|Advanced Concepts on Skins]]&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/Icons|Icons]]&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/Reset|Reset and External CSS]]&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/Chameleon|The &amp;quot;Chameleon&amp;quot; Feature]]&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/RTL|Right-to-Left (RTL) Reading Direction]]&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/High Contrast|High Contrast Compatibility]]&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/Browser Hacks|Dedicated Browser Hacks]]&lt;br /&gt;
* [[CKEditor_4.x/Skin_SDK/Create a Skin|Creating a Custom Skin]]&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/Setup|Set It Up]]&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/Customize|Bring Your Skin to Life]]&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/Test|Test and Shape It Up]]&lt;br /&gt;
** [[CKEditor_4.x/Skin_SDK/Build|Build and Release Your Skin]]&lt;br /&gt;
* [[CKEditor_4.x/Skin_SDK/Resources|Resources and Downloads]]&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK&amp;diff=7178</id>
		<title>CKEditor 4.x/Skin SDK</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_4.x/Skin_SDK&amp;diff=7178"/>
				<updated>2012-07-26T15:08:54Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Started the page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:CKEditor 4 Skin SDK}}The CKEditor 4 Skin SDK is the essential resource to successfuly develop skins for CKEditor 4.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/Coding_Style&amp;diff=6795</id>
		<title>FCKeditor 3.x/Design and Architecture/Coding Style</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/Coding_Style&amp;diff=6795"/>
				<updated>2012-01-02T10:23:22Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: /* File Headers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Coding Style Guidelines =&lt;br /&gt;
&lt;br /&gt;
These guidelines where defined based on mixed common standards mainly related to Java programming. It aims to reflect the generally accepted standards for JavaScript coding with some minor adjustments.&lt;br /&gt;
&lt;br /&gt;
It is quite common to take the Java style to write JavaScript code, assuming it is a &amp;quot;cut-down&amp;quot; version of Java. Although JavaScript has an indirect relation with Java, apart from the similar &amp;quot;C     &lt;br /&gt;
== General Recommendations  ==&lt;br /&gt;
&lt;br /&gt;
Any violation to the guide is allowed if it enhances readability. &lt;br /&gt;
&lt;br /&gt;
If the name &amp;quot;CKEditor&amp;quot; is used, if must always be written with &amp;quot;CKE&amp;quot; uppercased concatenated with &amp;quot;ditor&amp;quot; in lowercase. The following usages are wrong: &amp;quot;CKeditor&amp;quot;, &amp;quot;ckEditor&amp;quot;, &amp;quot;CK Editor&amp;quot;, etc. Exceptions are made for directories and file names, which must always be lowercased, and the CKEDITOR namespace name. &lt;br /&gt;
&lt;br /&gt;
If the name &amp;quot;FCKeditor&amp;quot; is used, it must always be written with &amp;quot;FCK&amp;quot; uppercased concatenated with &amp;quot;editor&amp;quot; in lowercase. The following are wrong: &amp;quot;FckEditor&amp;quot;, &amp;quot;FCKEditor&amp;quot;, &amp;quot;fckEditor&amp;quot;, &amp;quot;FCK Editor&amp;quot;, and so on. Exception is made for directory names, where all chars &amp;quot;should&amp;quot; be in lowercase. &lt;br /&gt;
&lt;br /&gt;
The name &amp;quot;JavaScript&amp;quot; should be written with both the &amp;quot;J&amp;quot; and &amp;quot;S&amp;quot; in uppercase. The following are wrong: &amp;quot;Javascript&amp;quot;, &amp;quot;javascript&amp;quot;, etc.&lt;br /&gt;
&lt;br /&gt;
== Naming Conventions ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Name Conventions  ===&lt;br /&gt;
&lt;br /&gt;
The ROOT namespace has a fixed name: CKEDITOR. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing namespaces must be all lowercase. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR.dom, CKEDITOR.env, CKEDITOR.ui&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing public classes and public global objects must be in PascalCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR.dom.Document, CKEDITOR.Util&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing constants must be all UPPERCASE. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR.STATUS_COMPLETE, CKEDITOR.EDITMODE_WYSIWYG, CKEDITOR.CTRL&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing public methods must be verbs and written in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;appendStyleSheet(), getElement (), setTimeout()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing public properties must be nouns and written in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;name, document, targetWindow&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing private methods must be verbs and written in camelCase prefixed with an underscore. &lt;br /&gt;
&amp;lt;pre&amp;gt;_doInternalStuff()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing private properties must be nouns and written in camelCase prefixed with an underscore. &lt;br /&gt;
&amp;lt;pre&amp;gt;_internalCounter, _prefix&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Abbreviations and acronyms should not be uppercase when used as name. &lt;br /&gt;
&amp;lt;pre&amp;gt;setHtml(), XmlDocument&lt;br /&gt;
NOT&lt;br /&gt;
setHTML(), XMLDocument&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
All names should be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Specific Name Conventions ===&lt;br /&gt;
&lt;br /&gt;
The prefixes &amp;quot;get&amp;quot; and &amp;quot;set&amp;quot; may be used on methods that get or set properties which require computation.&lt;br /&gt;
&amp;lt;pre&amp;gt;setArrayCount(), getFormattedValue()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The prefix &amp;quot;checkIs&amp;quot; may be used on methods which return boolean states which require computation.&lt;br /&gt;
&amp;lt;pre&amp;gt;checkIsValid(), checkIsEmpty()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Abbreviations in names should be avoided.&lt;br /&gt;
&amp;lt;pre&amp;gt;getDirectoryName(), applicationCommand&lt;br /&gt;
NOT&lt;br /&gt;
getDirName(), appCmd&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Files ==&lt;br /&gt;
&lt;br /&gt;
All files must be named in all lower case.&lt;br /&gt;
&lt;br /&gt;
Classes and global objects should be declared in individual files with the file name matching the class/object name.&lt;br /&gt;
&amp;lt;pre&amp;gt;fckbrowserinfo.js, fcktoolbarbutton.js&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Layout  ==&lt;br /&gt;
&lt;br /&gt;
For indentation, the TAB should be used. Development IDEs should be configured to represent TABs as 4 spaces. &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( test )&lt;br /&gt;
{&lt;br /&gt;
    if ( otherTest )&lt;br /&gt;
        doSomething();&lt;br /&gt;
    doMore();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Block layout should be as illustrated. &lt;br /&gt;
&amp;lt;pre&amp;gt;while (&amp;amp;nbsp;!done )&lt;br /&gt;
{&lt;br /&gt;
    doSomething();&lt;br /&gt;
    done = moreToDo();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Single statement (single line only) if/else/while/for could (preferably) be written without brackets, but never in the same line. &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( condition )&lt;br /&gt;
    statement;&lt;br /&gt;
&lt;br /&gt;
while ( condition )&lt;br /&gt;
    statement;&lt;br /&gt;
&lt;br /&gt;
for ( initialization&amp;amp;nbsp;; condition&amp;amp;nbsp;; update )&lt;br /&gt;
    statement;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above rule is not valid for nested blocks, like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;if ( condition )&lt;br /&gt;
{&lt;br /&gt;
    if ( anotherCondition )&lt;br /&gt;
        statement;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// WRONG:&lt;br /&gt;
if ( condition )&lt;br /&gt;
    if ( anotherCondition )&lt;br /&gt;
        statement;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The incompleteness of split lines must be made obvious. &lt;br /&gt;
&amp;lt;pre&amp;gt;totalSum = a + b + c + &lt;br /&gt;
    d + e; &lt;br /&gt;
&lt;br /&gt;
method( param1, param2,&lt;br /&gt;
    param3 ); &lt;br /&gt;
&lt;br /&gt;
setText( 'Long line split' + &lt;br /&gt;
    'into two parts.' );&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Whitespace  ===&lt;br /&gt;
&amp;quot;If&amp;quot;, &amp;quot;for&amp;quot;, &amp;quot;while&amp;quot; and &amp;quot;switch&amp;quot; should be followed by a white space.&lt;br /&gt;
&amp;lt;pre&amp;gt;if ( true )&lt;br /&gt;
NOT&lt;br /&gt;
if( true )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Conventional operators should be surrounded by a space (including ternary operators). &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( i &amp;amp;gt; 3 &amp;amp;amp;&amp;amp;amp; test == 'yes' )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Commas should be followed by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;function myFunction( parm1, param2, param3 )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Semi-colons in for statements should be surrounded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;for ( var i = 0&amp;amp;nbsp;; i &amp;amp;lt; count&amp;amp;nbsp;; i++ )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Semi-colons should not be preceded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;doSomething();&lt;br /&gt;
var name = 'John';&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Colons should be surrounded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;case 100&amp;amp;nbsp;:&lt;br /&gt;
NOT&lt;br /&gt;
case 100:&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Opening parenthesis must be followed by a space and closing parenthesis must be preceded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( myVar == 1 )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
There special cases where no space is recommended. When opening parenthesis for a &amp;quot;self-executing anonymous function&amp;quot; and when closing parenthesis after an indented code block:&lt;br /&gt;
&amp;lt;pre&amp;gt;(function()&lt;br /&gt;
{&lt;br /&gt;
    // Code here&lt;br /&gt;
})();&lt;br /&gt;
&lt;br /&gt;
myMethod( function()&lt;br /&gt;
    {&lt;br /&gt;
        // Code here&lt;br /&gt;
    });&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Functions/method calls should not be followed by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;doSomething( someParameter );&lt;br /&gt;
NOT&lt;br /&gt;
doSomething ( someParameter );&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Logical units within a block should be separated by one blank line. &lt;br /&gt;
&amp;lt;pre&amp;gt;// Create a new identity matrix&lt;br /&gt;
var matrix = new Matrix4x4();&lt;br /&gt;
&lt;br /&gt;
// Precompute angles for efficiency &lt;br /&gt;
var cosAngle = mathCos( angle );&lt;br /&gt;
var sinAngle = mathSin( angle );&lt;br /&gt;
&lt;br /&gt;
// Specify matrix as a rotation transformation &lt;br /&gt;
matrix.setElement( 1, 1, cosAngle );&lt;br /&gt;
matrix.setElement( 1, 2, sinAngle ); &lt;br /&gt;
matrix.setElement( 2, 1, -sinAngle );&lt;br /&gt;
matrix.setElement( 2, 2, cosAngle );&lt;br /&gt;
&lt;br /&gt;
// Apply rotation&lt;br /&gt;
transformation.multiply( matrix );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Multiple variables declaration in a single &amp;quot;var&amp;quot; statement must be aligned with a single tab.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var example = 1,&lt;br /&gt;
    sample = 2;&lt;br /&gt;
NOT&lt;br /&gt;
var example = 1,&lt;br /&gt;
        sample = 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variables  ==&lt;br /&gt;
&lt;br /&gt;
Variables must be always defined with &amp;quot;var&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Function parameters must be in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;function sum( firstNumber, secondNumber )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Local variables must be in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;function doSomething()&lt;br /&gt;
{&lt;br /&gt;
    var colorOne = 1;&lt;br /&gt;
    var colorTwo = 2;&lt;br /&gt;
&lt;br /&gt;
    return colorOne + colorTwo;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Several variables can be defined with a single var statement, but only if their initialization values are in single lines. Do not initialize more than one variable is a single line: &lt;br /&gt;
&amp;lt;pre&amp;gt;var aVar, someVar,&lt;br /&gt;
    other1Var = 10,&lt;br /&gt;
    other2Var = 25,&lt;br /&gt;
    isVar = true;&lt;br /&gt;
&lt;br /&gt;
var longVar = function()&lt;br /&gt;
{&lt;br /&gt;
    // This var takes more than one line.&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
var objVar =&lt;br /&gt;
{&lt;br /&gt;
    // This var takes more than one line.&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Comments  ==&lt;br /&gt;
&lt;br /&gt;
Tricky code should not be commented but rewritten: In general, the use of comments should be minimized by making the code self-documenting by appropriate name choices and an explicit logical structure. &lt;br /&gt;
&lt;br /&gt;
All comments should be written in English. Whenever possible, end comments with a period as normal phrases, and wrap comments within the first 80 characters of each line. &lt;br /&gt;
&lt;br /&gt;
There should be a space after the comment identifier. &lt;br /&gt;
&amp;lt;pre&amp;gt;// This is a comment.   NOT: //This is a comment &lt;br /&gt;
/**                     NOT: /** &lt;br /&gt;
 * This is block              *This is a block &lt;br /&gt;
 * comment.                   *comment &lt;br /&gt;
 */                           */&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that comment blocks should be opened with two asterisks only for documentation purposes. See [[FCKeditor 3.x/Design and Architecture/Documentation#JavaScript_API|JavaScript API Documentation]].&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions ==&lt;br /&gt;
&lt;br /&gt;
The '''regular expression literal''' should be used whenever possible, instead of the RegExp object, which should be used only when the regular expression pattern is not constant or depends on runtime computation.&lt;br /&gt;
&amp;lt;pre&amp;gt;/^foo\s*/i&lt;br /&gt;
NOT&lt;br /&gt;
new RegExp( '^foo\s*', 'i' )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Other than shortnesses and better readability, regular expression literals are compiled during script evaluation, which improves performance at runtime.&lt;br /&gt;
&lt;br /&gt;
== String Literals ==&lt;br /&gt;
&lt;br /&gt;
When defining string literals, use single quotes instead of double quotes, whenever possible.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;var s = 'Some text';&lt;br /&gt;
NOT&lt;br /&gt;
var s = &amp;quot;Some text&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== File Headers  ==&lt;br /&gt;
&lt;br /&gt;
There are minimum requirements for us to be able to make our code available to the world. Most of them are related to legal needs, which help us protecting the project from abuses. &lt;br /&gt;
&lt;br /&gt;
Here is a JavaScript template for the header to be included in the source code: &lt;br /&gt;
&amp;lt;pre&amp;gt;/*&lt;br /&gt;
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.&lt;br /&gt;
For licensing, see LICENSE.html or http://ckeditor.com/license&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Of course, different languages have different commenting syntax, so it is enough to copy the header from an existing file to maintain the style. &lt;br /&gt;
&lt;br /&gt;
=== Author Tags  ===&lt;br /&gt;
&lt;br /&gt;
Author names, e-mails or web site addresses should be avoided in the header. To justify that, let me recall a citation from Sander Striker, a member of the Apache Software Foundation, that can be found at [http://producingoss.com/en/managing-volunteers.html#territoriality Producing Open Source Software]: &lt;br /&gt;
&amp;lt;blockquote&amp;gt;At the Apache Software foundation we discourage the use of author tags in source code. There are various reasons for this, apart from the legal ramifications. Collaborative development is about working on projects as a group and caring for the project as a group. Giving credit is good, and should be done, but in a way that does not allow for false attribution, even by implication. There is no clear line for when to add or remove an author tag. Do you add your name when you change a comment? When you put in a one-line fix? Do you remove other author tags when you refactor the code and it looks 95% different? What do you do about people who go about touching every file, changing just enough to make the virtual author tag quota, so that their name will be everywhere?&amp;lt;br&amp;gt; &amp;lt;/blockquote&amp;gt; &amp;lt;blockquote&amp;gt;&lt;br /&gt;
There are better ways to give credit, and our preference is to use those. From a technical standpoint author tags are unnecessary; if you wish to find out who wrote a particular piece of code, the version control system can be consulted to figure that out. Author tags also tend to get out of date. Do you really wish to be contacted in private about a piece of code you wrote five years ago and were glad to have forgotten?&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;/blockquote&amp;gt; &lt;br /&gt;
The SVN is a good place to understand user participation. Even when committing changes proposed by Joe White, it is nice to add a comment like &amp;quot;Thanks to Joe White.&amp;quot; in the commit message.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/Coding_Style&amp;diff=6794</id>
		<title>FCKeditor 3.x/Design and Architecture/Coding Style</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/Coding_Style&amp;diff=6794"/>
				<updated>2012-01-02T10:22:23Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: /* Comments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Coding Style Guidelines =&lt;br /&gt;
&lt;br /&gt;
These guidelines where defined based on mixed common standards mainly related to Java programming. It aims to reflect the generally accepted standards for JavaScript coding with some minor adjustments.&lt;br /&gt;
&lt;br /&gt;
It is quite common to take the Java style to write JavaScript code, assuming it is a &amp;quot;cut-down&amp;quot; version of Java. Although JavaScript has an indirect relation with Java, apart from the similar &amp;quot;C     &lt;br /&gt;
== General Recommendations  ==&lt;br /&gt;
&lt;br /&gt;
Any violation to the guide is allowed if it enhances readability. &lt;br /&gt;
&lt;br /&gt;
If the name &amp;quot;CKEditor&amp;quot; is used, if must always be written with &amp;quot;CKE&amp;quot; uppercased concatenated with &amp;quot;ditor&amp;quot; in lowercase. The following usages are wrong: &amp;quot;CKeditor&amp;quot;, &amp;quot;ckEditor&amp;quot;, &amp;quot;CK Editor&amp;quot;, etc. Exceptions are made for directories and file names, which must always be lowercased, and the CKEDITOR namespace name. &lt;br /&gt;
&lt;br /&gt;
If the name &amp;quot;FCKeditor&amp;quot; is used, it must always be written with &amp;quot;FCK&amp;quot; uppercased concatenated with &amp;quot;editor&amp;quot; in lowercase. The following are wrong: &amp;quot;FckEditor&amp;quot;, &amp;quot;FCKEditor&amp;quot;, &amp;quot;fckEditor&amp;quot;, &amp;quot;FCK Editor&amp;quot;, and so on. Exception is made for directory names, where all chars &amp;quot;should&amp;quot; be in lowercase. &lt;br /&gt;
&lt;br /&gt;
The name &amp;quot;JavaScript&amp;quot; should be written with both the &amp;quot;J&amp;quot; and &amp;quot;S&amp;quot; in uppercase. The following are wrong: &amp;quot;Javascript&amp;quot;, &amp;quot;javascript&amp;quot;, etc.&lt;br /&gt;
&lt;br /&gt;
== Naming Conventions ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Name Conventions  ===&lt;br /&gt;
&lt;br /&gt;
The ROOT namespace has a fixed name: CKEDITOR. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing namespaces must be all lowercase. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR.dom, CKEDITOR.env, CKEDITOR.ui&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing public classes and public global objects must be in PascalCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR.dom.Document, CKEDITOR.Util&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing constants must be all UPPERCASE. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR.STATUS_COMPLETE, CKEDITOR.EDITMODE_WYSIWYG, CKEDITOR.CTRL&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing public methods must be verbs and written in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;appendStyleSheet(), getElement (), setTimeout()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing public properties must be nouns and written in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;name, document, targetWindow&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing private methods must be verbs and written in camelCase prefixed with an underscore. &lt;br /&gt;
&amp;lt;pre&amp;gt;_doInternalStuff()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing private properties must be nouns and written in camelCase prefixed with an underscore. &lt;br /&gt;
&amp;lt;pre&amp;gt;_internalCounter, _prefix&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Abbreviations and acronyms should not be uppercase when used as name. &lt;br /&gt;
&amp;lt;pre&amp;gt;setHtml(), XmlDocument&lt;br /&gt;
NOT&lt;br /&gt;
setHTML(), XMLDocument&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
All names should be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Specific Name Conventions ===&lt;br /&gt;
&lt;br /&gt;
The prefixes &amp;quot;get&amp;quot; and &amp;quot;set&amp;quot; may be used on methods that get or set properties which require computation.&lt;br /&gt;
&amp;lt;pre&amp;gt;setArrayCount(), getFormattedValue()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The prefix &amp;quot;checkIs&amp;quot; may be used on methods which return boolean states which require computation.&lt;br /&gt;
&amp;lt;pre&amp;gt;checkIsValid(), checkIsEmpty()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Abbreviations in names should be avoided.&lt;br /&gt;
&amp;lt;pre&amp;gt;getDirectoryName(), applicationCommand&lt;br /&gt;
NOT&lt;br /&gt;
getDirName(), appCmd&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Files ==&lt;br /&gt;
&lt;br /&gt;
All files must be named in all lower case.&lt;br /&gt;
&lt;br /&gt;
Classes and global objects should be declared in individual files with the file name matching the class/object name.&lt;br /&gt;
&amp;lt;pre&amp;gt;fckbrowserinfo.js, fcktoolbarbutton.js&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Layout  ==&lt;br /&gt;
&lt;br /&gt;
For indentation, the TAB should be used. Development IDEs should be configured to represent TABs as 4 spaces. &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( test )&lt;br /&gt;
{&lt;br /&gt;
    if ( otherTest )&lt;br /&gt;
        doSomething();&lt;br /&gt;
    doMore();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Block layout should be as illustrated. &lt;br /&gt;
&amp;lt;pre&amp;gt;while (&amp;amp;nbsp;!done )&lt;br /&gt;
{&lt;br /&gt;
    doSomething();&lt;br /&gt;
    done = moreToDo();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Single statement (single line only) if/else/while/for could (preferably) be written without brackets, but never in the same line. &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( condition )&lt;br /&gt;
    statement;&lt;br /&gt;
&lt;br /&gt;
while ( condition )&lt;br /&gt;
    statement;&lt;br /&gt;
&lt;br /&gt;
for ( initialization&amp;amp;nbsp;; condition&amp;amp;nbsp;; update )&lt;br /&gt;
    statement;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above rule is not valid for nested blocks, like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;if ( condition )&lt;br /&gt;
{&lt;br /&gt;
    if ( anotherCondition )&lt;br /&gt;
        statement;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// WRONG:&lt;br /&gt;
if ( condition )&lt;br /&gt;
    if ( anotherCondition )&lt;br /&gt;
        statement;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The incompleteness of split lines must be made obvious. &lt;br /&gt;
&amp;lt;pre&amp;gt;totalSum = a + b + c + &lt;br /&gt;
    d + e; &lt;br /&gt;
&lt;br /&gt;
method( param1, param2,&lt;br /&gt;
    param3 ); &lt;br /&gt;
&lt;br /&gt;
setText( 'Long line split' + &lt;br /&gt;
    'into two parts.' );&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Whitespace  ===&lt;br /&gt;
&amp;quot;If&amp;quot;, &amp;quot;for&amp;quot;, &amp;quot;while&amp;quot; and &amp;quot;switch&amp;quot; should be followed by a white space.&lt;br /&gt;
&amp;lt;pre&amp;gt;if ( true )&lt;br /&gt;
NOT&lt;br /&gt;
if( true )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Conventional operators should be surrounded by a space (including ternary operators). &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( i &amp;amp;gt; 3 &amp;amp;amp;&amp;amp;amp; test == 'yes' )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Commas should be followed by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;function myFunction( parm1, param2, param3 )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Semi-colons in for statements should be surrounded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;for ( var i = 0&amp;amp;nbsp;; i &amp;amp;lt; count&amp;amp;nbsp;; i++ )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Semi-colons should not be preceded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;doSomething();&lt;br /&gt;
var name = 'John';&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Colons should be surrounded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;case 100&amp;amp;nbsp;:&lt;br /&gt;
NOT&lt;br /&gt;
case 100:&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Opening parenthesis must be followed by a space and closing parenthesis must be preceded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( myVar == 1 )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
There special cases where no space is recommended. When opening parenthesis for a &amp;quot;self-executing anonymous function&amp;quot; and when closing parenthesis after an indented code block:&lt;br /&gt;
&amp;lt;pre&amp;gt;(function()&lt;br /&gt;
{&lt;br /&gt;
    // Code here&lt;br /&gt;
})();&lt;br /&gt;
&lt;br /&gt;
myMethod( function()&lt;br /&gt;
    {&lt;br /&gt;
        // Code here&lt;br /&gt;
    });&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Functions/method calls should not be followed by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;doSomething( someParameter );&lt;br /&gt;
NOT&lt;br /&gt;
doSomething ( someParameter );&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Logical units within a block should be separated by one blank line. &lt;br /&gt;
&amp;lt;pre&amp;gt;// Create a new identity matrix&lt;br /&gt;
var matrix = new Matrix4x4();&lt;br /&gt;
&lt;br /&gt;
// Precompute angles for efficiency &lt;br /&gt;
var cosAngle = mathCos( angle );&lt;br /&gt;
var sinAngle = mathSin( angle );&lt;br /&gt;
&lt;br /&gt;
// Specify matrix as a rotation transformation &lt;br /&gt;
matrix.setElement( 1, 1, cosAngle );&lt;br /&gt;
matrix.setElement( 1, 2, sinAngle ); &lt;br /&gt;
matrix.setElement( 2, 1, -sinAngle );&lt;br /&gt;
matrix.setElement( 2, 2, cosAngle );&lt;br /&gt;
&lt;br /&gt;
// Apply rotation&lt;br /&gt;
transformation.multiply( matrix );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Multiple variables declaration in a single &amp;quot;var&amp;quot; statement must be aligned with a single tab.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var example = 1,&lt;br /&gt;
    sample = 2;&lt;br /&gt;
NOT&lt;br /&gt;
var example = 1,&lt;br /&gt;
        sample = 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variables  ==&lt;br /&gt;
&lt;br /&gt;
Variables must be always defined with &amp;quot;var&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Function parameters must be in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;function sum( firstNumber, secondNumber )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Local variables must be in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;function doSomething()&lt;br /&gt;
{&lt;br /&gt;
    var colorOne = 1;&lt;br /&gt;
    var colorTwo = 2;&lt;br /&gt;
&lt;br /&gt;
    return colorOne + colorTwo;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Several variables can be defined with a single var statement, but only if their initialization values are in single lines. Do not initialize more than one variable is a single line: &lt;br /&gt;
&amp;lt;pre&amp;gt;var aVar, someVar,&lt;br /&gt;
    other1Var = 10,&lt;br /&gt;
    other2Var = 25,&lt;br /&gt;
    isVar = true;&lt;br /&gt;
&lt;br /&gt;
var longVar = function()&lt;br /&gt;
{&lt;br /&gt;
    // This var takes more than one line.&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
var objVar =&lt;br /&gt;
{&lt;br /&gt;
    // This var takes more than one line.&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Comments  ==&lt;br /&gt;
&lt;br /&gt;
Tricky code should not be commented but rewritten: In general, the use of comments should be minimized by making the code self-documenting by appropriate name choices and an explicit logical structure. &lt;br /&gt;
&lt;br /&gt;
All comments should be written in English. Whenever possible, end comments with a period as normal phrases, and wrap comments within the first 80 characters of each line. &lt;br /&gt;
&lt;br /&gt;
There should be a space after the comment identifier. &lt;br /&gt;
&amp;lt;pre&amp;gt;// This is a comment.   NOT: //This is a comment &lt;br /&gt;
/**                     NOT: /** &lt;br /&gt;
 * This is block              *This is a block &lt;br /&gt;
 * comment.                   *comment &lt;br /&gt;
 */                           */&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that comment blocks should be opened with two asterisks only for documentation purposes. See [[FCKeditor 3.x/Design and Architecture/Documentation#JavaScript_API|JavaScript API Documentation]].&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions ==&lt;br /&gt;
&lt;br /&gt;
The '''regular expression literal''' should be used whenever possible, instead of the RegExp object, which should be used only when the regular expression pattern is not constant or depends on runtime computation.&lt;br /&gt;
&amp;lt;pre&amp;gt;/^foo\s*/i&lt;br /&gt;
NOT&lt;br /&gt;
new RegExp( '^foo\s*', 'i' )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Other than shortnesses and better readability, regular expression literals are compiled during script evaluation, which improves performance at runtime.&lt;br /&gt;
&lt;br /&gt;
== String Literals ==&lt;br /&gt;
&lt;br /&gt;
When defining string literals, use single quotes instead of double quotes, whenever possible.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;var s = 'Some text';&lt;br /&gt;
NOT&lt;br /&gt;
var s = &amp;quot;Some text&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== File Headers  ==&lt;br /&gt;
&lt;br /&gt;
There are minimum requirements for us to be able to make our code available to the world. Most of them are related to legal needs, which help us protecting the project from abuses. &lt;br /&gt;
&lt;br /&gt;
Here is a JavaScript template for the header to be included in the source code: &lt;br /&gt;
&amp;lt;pre&amp;gt;/*&lt;br /&gt;
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.&lt;br /&gt;
For licensing, see LICENSE.html or http://ckeditor.com/license&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Of course, different languages have different commenting syntax, so it is enough to copy the header from an existing file to maintain the style. &lt;br /&gt;
&lt;br /&gt;
=== Author Tags  ===&lt;br /&gt;
&lt;br /&gt;
Author names, e-mails or web site addresses should be avoided in the header. To justify that, let me recall a citation from Sander Striker, a member of the Apache Software Foundation, that can be found at [http://producingoss.com/en/managing-volunteers.html#territoriality Producing Open Source Software]: &lt;br /&gt;
&amp;lt;blockquote&amp;gt;At the Apache Software foundation we discourage the use of author tags in source code. There are various reasons for this, apart from the legal ramifications. Collaborative development is about working on projects as a group and caring for the project as a group. Giving credit is good, and should be done, but in a way that does not allow for false attribution, even by implication. There is no clear line for when to add or remove an author tag. Do you add your name when you change a comment? When you put in a one-line fix? Do you remove other author tags when you refactor the code and it looks 95% different? What do you do about people who go about touching every file, changing just enough to make the virtual author tag quota, so that their name will be everywhere?&amp;lt;br&amp;gt; &amp;lt;/blockquote&amp;gt; &amp;lt;blockquote&amp;gt;&lt;br /&gt;
There are better ways to give credit, and our preference is to use those. From a technical standpoint author tags are unnecessary; if you wish to find out who wrote a particular piece of code, the version control system can be consulted to figure that out. Author tags also tend to get out of date. Do you really wish to be contacted in private about a piece of code you wrote five years ago and were glad to have forgotten?&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;/blockquote&amp;gt; &lt;br /&gt;
The SVN is a good place to understand user participation. Even when committing changes proposed by Joe White, it is nice to add a comment like &amp;quot;Thanks to Joe White.&amp;quot; in the commit message.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Tutorials/SimpleLink_Plugin_Part_1&amp;diff=6473</id>
		<title>CKEditor 3.x/Tutorials/SimpleLink Plugin Part 1</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Tutorials/SimpleLink_Plugin_Part_1&amp;diff=6473"/>
				<updated>2011-09-13T09:03:39Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Minor code fixes.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:Creating a CKEditor Plugin with a Custom Dialog Window}}&lt;br /&gt;
__TOC__&lt;br /&gt;
The aim of this tutorial is to demonstrate how to create a custom plugin dialog window that contains various types of fields.&lt;br /&gt;
 &lt;br /&gt;
We are going to develop a '''Simple Link plugin''' that can replace the more feature-rich default [[CKEditor_3.x/Users_Guide/Rich_Text/Links|Link]] feature of CKEditor with a simplified solution. The plugin dialog window will let the user insert a link through a customized dialog window that is opened after clicking a dedicated toolbar button.&lt;br /&gt;
&lt;br /&gt;
The plugin will be named &amp;lt;code&amp;gt;'''simpleLink'''&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Plugin Files ==&lt;br /&gt;
Firstly, we will need to create the &amp;lt;code&amp;gt;simpleLink&amp;lt;/code&amp;gt; folder inside the &amp;lt;code&amp;gt;plugins&amp;lt;/code&amp;gt; directory of the CKEditor installation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;note&amp;gt;Remember that for CKEditor the name of the plugin folder is important and has to be the same as the name of the plugin, otherwise the editor will not be able to recognize it.&amp;lt;/note&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inside the newly created &amp;lt;code&amp;gt;simpleLink&amp;lt;/code&amp;gt; folder we are going to place the &amp;lt;code&amp;gt;plugin.js&amp;lt;/code&amp;gt; file that will contain the plugin logic. Apart from that, since we will also need a toolbar icon for our plugin, we are going to add an &amp;lt;code&amp;gt;images&amp;lt;/code&amp;gt; folder and subsequently place the &amp;lt;code&amp;gt;icon.png&amp;lt;/code&amp;gt; file inside.&lt;br /&gt;
&lt;br /&gt;
To sum up, we will need the following file structure for our plugin to work:&lt;br /&gt;
* &amp;lt;code&amp;gt;''ckeditor root''&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;plugins&amp;lt;/code&amp;gt;&lt;br /&gt;
*** &amp;lt;code&amp;gt;simpleLink&amp;lt;/code&amp;gt;&lt;br /&gt;
**** &amp;lt;code&amp;gt;images&amp;lt;/code&amp;gt;&lt;br /&gt;
***** &amp;lt;code&amp;gt;icon.png&amp;lt;/code&amp;gt;&lt;br /&gt;
**** &amp;lt;code&amp;gt;plugin.js&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Plugin Source Code ==&lt;br /&gt;
With the following structure ready, it is time to open the &amp;lt;code&amp;gt;plugin.js&amp;lt;/code&amp;gt; file in a text editor and to start creating the source code of the plugin.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
CKEDITOR.plugins.add( 'simpleLink',&lt;br /&gt;
{&lt;br /&gt;
	init: function( editor )&lt;br /&gt;
	{&lt;br /&gt;
		// Plugin logic goes here...&lt;br /&gt;
	}&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
All CKEditor plugins are created by using the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.resourceManager.html#add CKEDITOR.plugins.add]&amp;lt;/code&amp;gt; function. This function should contain the plugin name (&amp;lt;code&amp;gt;'simpleLink'&amp;lt;/code&amp;gt;) and the plugin logic placed inside the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.pluginDefinition.html#init init]&amp;lt;/code&amp;gt; function that is called upon the initialization of the editor instance.&lt;br /&gt;
&lt;br /&gt;
=== Creating an Editor Command ===&lt;br /&gt;
We want our plugin to have a dialog window, so we need to define an editor command that opens a new dialog window. To do this,  we will need to use the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#addCommand  addCommand]&amp;lt;/code&amp;gt; function opening the &amp;lt;code&amp;gt;simpleLinkDialog&amp;lt;/code&amp;gt; window that we are going to define in a moment by using the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialogCommand.html CKEDITOR.dialogCommand]&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
editor.addCommand( 'simpleLinkDialog', new CKEDITOR.dialogCommand( 'simpleLinkDialog' ) );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a Toolbar Button ===&lt;br /&gt;
The plugin dialog window is to be opened by using a toolbar button. To this end, we need to define a button that will be associated with the dialog window. The &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.ui.html#addButton CKEditor.ui.addButton]&amp;lt;/code&amp;gt; function accepts a button name (&amp;lt;code&amp;gt;'SimpleLink'&amp;lt;/code&amp;gt;) along with the definition of the tooltip text (&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;) and the button icon (&amp;lt;code&amp;gt;icon&amp;lt;/code&amp;gt;). Note that &amp;lt;code&amp;gt;this.path&amp;lt;/code&amp;gt; is the directory where the &amp;lt;code&amp;gt;plugin.js&amp;lt;/code&amp;gt; file resides.&lt;br /&gt;
&lt;br /&gt;
These parameters are responsible for the button presentation. To make the button actually work, we need to connect it to the plugin command name defined above by using the &amp;lt;code&amp;gt;command&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
editor.ui.addButton( 'SimpleLink',&lt;br /&gt;
{&lt;br /&gt;
	label: 'Insert a Link',&lt;br /&gt;
	command: 'simpleLinkDialog',&lt;br /&gt;
	icon: this.path + 'images/icon.png'&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CKEditor Initialization ===&lt;br /&gt;
It is now time to initialize a CKEditor instance that will use the Simple Link plugin along with its toolbar button.&lt;br /&gt;
&lt;br /&gt;
To register the plugin with CKEditor, we have to add it to the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.extraPlugins extraPlugins]&amp;lt;/code&amp;gt; list. We also need to enhance the toolbar definition and add the plugin button by using the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.toolbar toolbar]&amp;lt;/code&amp;gt; parameter. &lt;br /&gt;
&lt;br /&gt;
Open the page that will contain CKEditor in a text editor, and insert a CKEditor instance using the following toolbar and plugin configuration.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	// Replace the &amp;lt;textarea id=&amp;quot;editor1&amp;quot;&amp;gt; with a CKEditor instance using default configuration.&lt;br /&gt;
	CKEDITOR.replace( 'editor1',&lt;br /&gt;
		{&lt;br /&gt;
			extraPlugins : 'simpleLink',&lt;br /&gt;
			toolbar :&lt;br /&gt;
			[&lt;br /&gt;
				['Source', '-', 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink'],&lt;br /&gt;
				['About','-','SimpleLink']&lt;br /&gt;
			]&lt;br /&gt;
		});&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you load the page containing the above CKEditor instance you should be able to see the new plugin toolbar button along with its tooltip.&lt;br /&gt;
&lt;br /&gt;
[[Image:simpleLink_button_added.png|center|frame|SimpleLink plugin button added to CKEditor toolbar]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plugin Dialog Window ===&lt;br /&gt;
Up till now, most of the actions that we performed were equivalent to what we did while creating the [[CKEditor_3.x/Developers_Guide/Customization/Plugins/Abbr_Plugin_Part_1|Abbreviation]] plugin. Here is, however, where the really interesting part begins. We will now move on to creating a custom dialog window along with its contents.&lt;br /&gt;
&lt;br /&gt;
Clicking the button should open the &amp;lt;code&amp;gt;simpleLinkDialog&amp;lt;/code&amp;gt; dialog window. First, however, we need to return to the Simple Link plugin source file and [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.dialogDefinition.html define the dialog window] by using the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.html#.add CKEDITOR.dialog.add]&amp;lt;/code&amp;gt; function. To see all dialog window definition elements, refer to [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.dialogDefinition.html CKEditor JavaScript API].&lt;br /&gt;
&lt;br /&gt;
In our case we will give the dialog window a name (&amp;lt;code&amp;gt;'simpleLinkDialog'&amp;lt;/code&amp;gt;) and use the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.dialogDefinition.html#title title]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.dialogDefinition.html#minWidth minWidth]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.dialogDefinition.html#minHeight minHeight]&amp;lt;/code&amp;gt; parameters to define its title and minimum dimensions, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;note&amp;gt;The name selected for the dialog window is the name that appears in the &amp;lt;code&amp;gt;addCommand&amp;lt;/code&amp;gt; function above.&lt;br /&gt;
&amp;lt;/note&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Dialog Window Tab ====&lt;br /&gt;
The dialog window should also contain some contents, so we will begin with adding a tab along with its label. In all CKEditor dialog windows the contents of a dialog window are defined iside the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.dialogDefinition.html#contents contents]&amp;lt;/code&amp;gt; array. This array contains &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.contentDefinition.html CKEDITOR.dialog.contentDefinition]&amp;lt;/code&amp;gt; objects that consititute the tabs (or &amp;quot;content pages&amp;quot;) of a dialog window.&lt;br /&gt;
&lt;br /&gt;
We will give our dialog window tab an &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.contentDefinition.html#id id]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.contentDefinition.html#label label]&amp;lt;/code&amp;gt;. Please note that since in our case the dialog window contains just one tab (or &amp;quot;page&amp;quot;), the tab's name (label) will not be visible. However, even though the &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; property is not required, it is a good practice to include it since it plays its role in accessibility support as it will be read aloud by screen readers.&lt;br /&gt;
&lt;br /&gt;
Note that by default CKEditor also adds the standard '''OK''' and '''Cancel''' buttons. If you want to customize them (i.e. remove both or just one, add custom ones), you can use the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definition.html#buttons buttons]&amp;lt;/code&amp;gt; array to add new &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.ui.dialog.button.html button]&amp;lt;/code&amp;gt; elements.&lt;br /&gt;
&lt;br /&gt;
A dialog window tab created in this way should also contain some real content, like text fields, checkboxes, or drop-down lists. These will be added in the next step inside the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.contentDefinition.html#elements elements]&amp;lt;/code&amp;gt; property.&lt;br /&gt;
&lt;br /&gt;
In order to create the Simple Link plugin dialog window, add the following code in the &amp;lt;code&amp;gt;plugin.js&amp;lt;/code&amp;gt; file below the plugin toolbar button definition.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
CKEDITOR.dialog.add( 'simpleLinkDialog', function( editor )&lt;br /&gt;
{&lt;br /&gt;
	return {&lt;br /&gt;
		title : 'Link Properties',&lt;br /&gt;
		minWidth : 400,&lt;br /&gt;
		minHeight : 200,&lt;br /&gt;
		contents :&lt;br /&gt;
		[&lt;br /&gt;
			{&lt;br /&gt;
				id : 'general',&lt;br /&gt;
				label : 'Settings',&lt;br /&gt;
				elements :&lt;br /&gt;
				[&lt;br /&gt;
				 	// UI elements of the Settings tab.&lt;br /&gt;
				]&lt;br /&gt;
			}&lt;br /&gt;
		]&lt;br /&gt;
	};&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The result of this change can be seen immediately. Click the '''Insert a Link''' toolbar button in order to open the newly created (and so far empty) '''Link Properties''' dialog window.&lt;br /&gt;
&lt;br /&gt;
[[Image:simpleLink_empty_tab.png|center|frame|A SimpleLink plugin dialog window with one tab added]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Dialog Window Tab Elements ====&lt;br /&gt;
User interface elements that can be added to a dialog window tab are defined in the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.contentDefinition.html#elements elements]&amp;lt;/code&amp;gt; parameter, which is an array of &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.uiElementDefinition.html CKEDITOR.dialog.uiElementDefinition]&amp;lt;/code&amp;gt; objects.&lt;br /&gt;
&lt;br /&gt;
Since we want to try a number of different types of dialog window UI elements, in this case the dialog window tab will consist of a larger textarea, smaller text field, a selection field (drop-down list), and a checkbox. We will also use HTML to create the tab description.&lt;br /&gt;
&lt;br /&gt;
Each UI element is added inside the &amp;lt;code&amp;gt;elements&amp;lt;/code&amp;gt; array, with the definition placed inside the curly braces (&amp;lt;code&amp;gt;{}&amp;lt;/code&amp;gt;), separated from one another with a comma. The &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.uiElementDefinition.html#type type]&amp;lt;/code&amp;gt; parameter is a required one and defines the type of the element.&lt;br /&gt;
&lt;br /&gt;
===== UI Elements: HTML =====&lt;br /&gt;
The first UI element we are going to use is the HTML type. The &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.ui.dialog.html.html html]&amp;lt;/code&amp;gt; type allows you to define the contents of a dialog window page by using pure HTML code. The HTML code to be placed inside the page is entered in the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.ui.dialog.html.html#constructor html]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
elements :&lt;br /&gt;
[&lt;br /&gt;
	{&lt;br /&gt;
		type : 'html',&lt;br /&gt;
		html : 'This dialog window lets you create simple links for your website.'		&lt;br /&gt;
	}&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After adding the above code to the plugin source, the '''Link Properties''' dialog window looks like this.&lt;br /&gt;
&lt;br /&gt;
[[Image:simpleLink_tab_html.png|center|frame|HTML element added in the SimpleLink plugin dialog window]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== UI Elements: Textarea =====&lt;br /&gt;
The element to be placed underneath the description is the textarea element that will be obligatory to fill in. We will use it to add the text that is displayed in the document and points to the inserted link.&lt;br /&gt;
&lt;br /&gt;
In order to create a textarea we will use the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.ui.dialog.textarea.html textarea]&amp;lt;/code&amp;gt; UI element type and assign it an &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.uiElementDefinition.html#id id]&amp;lt;/code&amp;gt;. The textarea will also need a label that will describe its purpose and can be added using the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.ui.dialog.labeledElement.html#constructor label]&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
Since filling in the contents of the textarea will be obligatory, we will set the &amp;lt;code&amp;gt;required&amp;lt;/code&amp;gt; parameter to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; and inside the &amp;lt;code&amp;gt;validate&amp;lt;/code&amp;gt; parameter add some simple validation that checks whether the field is empty. If it is, the validator will return an error message.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	type : 'textarea',&lt;br /&gt;
	id : 'contents',&lt;br /&gt;
	label : 'Displayed Text',&lt;br /&gt;
	validate : CKEDITOR.dialog.validate.notEmpty( 'The Displayed Text field cannot be empty.' ),&lt;br /&gt;
	required : true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the appearance of the '''Link Properties''' dialog window after we apply the changes.&lt;br /&gt;
&lt;br /&gt;
[[Image:simpleLink_tab_textarea.png|center|frame|Textarea element added in the SimpleLink plugin dialog window]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The size of the textarea can obviously be customized. If you want to change the element's dimensions, use the &amp;lt;code&amp;gt;cols&amp;lt;/code&amp;gt; amd &amp;lt;code&amp;gt;rows&amp;lt;/code&amp;gt; parameters as defined in the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.ui.dialog.textarea.html#constructor textarea]&amp;lt;/code&amp;gt; constructor.&lt;br /&gt;
&lt;br /&gt;
===== UI Elements: Text Field =====&lt;br /&gt;
Another UI element that we are going to use in the plugin is the text field (text input) element. We will use it to enter the Internet address of the linked page.&lt;br /&gt;
&lt;br /&gt;
A text field lets you enter text into a single-line field and is meant for shorter entries. Its definition is very similar to the textarea &amp;amp;mdash; the main difference lies in the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; parameter that is set to &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.ui.dialog.textInput.html text]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; parameters will be defined as done above. In our case this field is obligatory, so we will set its &amp;lt;code&amp;gt;required&amp;lt;/code&amp;gt; parameter to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;. The validation code inside the &amp;lt;code&amp;gt;validate&amp;lt;/code&amp;gt; parameter will also be used to check whether the field was filled in. If it is empty, the validator will return an error message.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	type : 'text',&lt;br /&gt;
	id : 'url',&lt;br /&gt;
	label : 'URL',&lt;br /&gt;
	validate : CKEDITOR.dialog.validate.notEmpty( 'The link must have a URL.' ),&lt;br /&gt;
	required : true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the latest addition of the text field the '''Link Properties''' dialog window will look like this.&lt;br /&gt;
&lt;br /&gt;
[[Image:simpleLink_tab_text.png|center|frame|Text field element added in the SimpleLink plugin dialog window]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== UI Elements: Selection Field =====&lt;br /&gt;
Another type of UI elements that we are going to try out is the selection field (drop-down list). In this case we will use it to allow the user to choose one of the pre-defined styles for the link text.&lt;br /&gt;
&lt;br /&gt;
To create a selection field we need to set the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; parameter of the element to &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.ui.dialog.select.html select]&amp;lt;/code&amp;gt;. As before, we will add the &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt; parameters appropriate for this field. The items to be chosen from the selection list are defined inside the obligatory &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.ui.dialog.select.html#constructor items]&amp;lt;/code&amp;gt; array that contains the values along with their displayed text. The first item defined in the list will be used by default; you can also use the &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; parameter to change this setting.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	type : 'select',&lt;br /&gt;
	id : 'style',&lt;br /&gt;
	label : 'Style',&lt;br /&gt;
	items : &lt;br /&gt;
	[&lt;br /&gt;
		[ '&amp;lt;none&amp;gt;', '' ],&lt;br /&gt;
		[ 'Bold', 'b' ],&lt;br /&gt;
		[ 'Underline', 'u' ],&lt;br /&gt;
		[ 'Italics', 'i' ]&lt;br /&gt;
	]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the selection field is added to the plugin dialog window and is expanded by the user, the style that was selected by default (the first one, if not defined otherwise) is highlighted.&lt;br /&gt;
&lt;br /&gt;
[[Image:simpleLink_tab_select.png|center|frame|Selection field element added in the SimpleLink plugin dialog window]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== UI Elements: Checkbox =====&lt;br /&gt;
The final UI element to be added to the plugin dialog window is the checkbox. In this case the user will be able to select it if the link is to be opened in a new window.&lt;br /&gt;
&lt;br /&gt;
In order to create a checkbox we need to set the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; parameter of the element to &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.ui.dialog.checkbox.html checkbox]&amp;lt;/code&amp;gt;. As before, the field will also get a standard &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;. Since we want opening in a new page to be a default behavior, we will set the &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; parameter to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; in order to have the checkbox selected when the plugin dialog window is opened.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;note&amp;gt;Please note that the &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; parameter needs to be placed in single quotes since it is a reserved JavaScript word.&lt;br /&gt;
&amp;lt;/note&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	type : 'checkbox',&lt;br /&gt;
	id : 'newPage',&lt;br /&gt;
	label : 'Opens in a new page',&lt;br /&gt;
	'default' : true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The figure below shows the '''Link Properties''' dialog window complete with all the UI elements added above.&lt;br /&gt;
&lt;br /&gt;
[[Image:simpleLink_tab_checkbox.png|center|frame|Checkbox element added in the SimpleLink plugin dialog window]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plugin Behavior ===&lt;br /&gt;
The plugin now ''looks'' good &amp;amp;mdash; the toolbar button is in place and the dialog window is complete with a couple of sample UI elements. There is, however, one problem: it does not really ''do'' anything.&lt;br /&gt;
&lt;br /&gt;
We will start with creating the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.dialogDefinition.html#onOk onOk]&amp;lt;/code&amp;gt; method that is invoked once the user accepts the changes introduced in the dialog window by clicking the '''OK''' button or pressing the ''Enter'' key on the keyboard. The method will be defined inside the &amp;lt;code&amp;gt;CKEDITOR.dialog.add&amp;lt;/code&amp;gt; function, below the definition of dialog window contents.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
onOk : function()&lt;br /&gt;
{&lt;br /&gt;
	// The code that will be executed when the user accepts the changes.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We shall start the &amp;lt;code&amp;gt;onOk&amp;lt;/code&amp;gt; function from creating a link element and a &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; object that will store the data entered in the dialog window fields. The link will be based on a standard HTML &amp;lt;code&amp;gt;&amp;lt;a&amp;gt;&amp;lt;/code&amp;gt; element and as a new DOM element it will be created by using the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dom.document.html#createElement createElement]&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var dialog = this,&lt;br /&gt;
	data = {},&lt;br /&gt;
	link = editor.document.createElement( 'a' );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to populate the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; object with the contents of the dialog window fields we will use the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.html#commitContent commitContent]&amp;lt;/code&amp;gt; function. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
this.commitContent( data );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make the &amp;lt;code&amp;gt;commitContent&amp;lt;/code&amp;gt; function work we will however first need to define the commit functions themselves. In order to do that, we will have to revise the code of the dialog window UI elements again.&lt;br /&gt;
&lt;br /&gt;
The commit functions will have to be added to all user input elements of the plugin dialog window &amp;amp;mdash; the textarea, the text field, the selection field, and the checkbox. In each case the functions need to get the value entered by the user by using the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dom.element.html#getValue getValue]&amp;lt;/code&amp;gt; function and assign it to an appropriate attribute of the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
elements :&lt;br /&gt;
[&lt;br /&gt;
	{&lt;br /&gt;
		type : 'html',&lt;br /&gt;
		html : 'This dialog window lets you create simple links for your website.'		&lt;br /&gt;
	},&lt;br /&gt;
	{&lt;br /&gt;
		type : 'textarea',&lt;br /&gt;
		id : 'contents',&lt;br /&gt;
		label : 'Displayed Text',&lt;br /&gt;
		validate : CKEDITOR.dialog.validate.notEmpty( 'The Displayed Text field cannot be empty.' ),&lt;br /&gt;
		required : true,&lt;br /&gt;
		commit : function( data )&lt;br /&gt;
		{&lt;br /&gt;
			data.contents = this.getValue();&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	{&lt;br /&gt;
		type : 'text',&lt;br /&gt;
		id : 'url',&lt;br /&gt;
		label : 'URL',&lt;br /&gt;
		validate : CKEDITOR.dialog.validate.notEmpty( 'The link must have a URL.' ),&lt;br /&gt;
		required : true,&lt;br /&gt;
		commit : function( data )&lt;br /&gt;
		{&lt;br /&gt;
			data.url = this.getValue();&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	{&lt;br /&gt;
		type : 'select',&lt;br /&gt;
		id : 'style',&lt;br /&gt;
		label : 'Style',&lt;br /&gt;
		items : &lt;br /&gt;
		[&lt;br /&gt;
			[ '&amp;lt;none&amp;gt;', '' ],&lt;br /&gt;
			[ 'Bold', 'b' ],&lt;br /&gt;
			[ 'Underline', 'u' ],&lt;br /&gt;
			[ 'Italics', 'i' ]&lt;br /&gt;
		],&lt;br /&gt;
		commit : function( data )&lt;br /&gt;
		{&lt;br /&gt;
			data.style = this.getValue();&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	{&lt;br /&gt;
		type : 'checkbox',&lt;br /&gt;
		id : 'newPage',&lt;br /&gt;
		label : 'Opens in a new page',&lt;br /&gt;
		'default' : true,&lt;br /&gt;
		commit : function( data )&lt;br /&gt;
		{&lt;br /&gt;
			data.newPage = this.getValue();&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now have the values entered in the plugin dialog window in the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; object. It is time to return to the &amp;lt;code&amp;gt;onOk&amp;lt;/code&amp;gt; function and start building the contents of the &amp;lt;code&amp;gt;link&amp;lt;/code&amp;gt; variable that contains the &amp;lt;code&amp;gt;&amp;lt;a&amp;gt;&amp;lt;/code&amp;gt; element.&lt;br /&gt;
&lt;br /&gt;
The URL of the linked page will be added to the &amp;lt;code&amp;gt;&amp;lt;a&amp;gt;&amp;lt;/code&amp;gt; element by using the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dom.element.html#setAttribute setAttribute]&amp;lt;/code&amp;gt; function to update the &amp;lt;code&amp;gt;href&amp;lt;/code&amp;gt; attribute of the &amp;lt;code&amp;gt;link&amp;lt;/code&amp;gt; object with the contents of the &amp;lt;code&amp;gt;url&amp;lt;/code&amp;gt; attribute of the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
link.setAttribute( 'href', data.url );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the checkbox setting the link to open in a new page (&amp;lt;code&amp;gt;newPage&amp;lt;/code&amp;gt;) was selected, we also need to set the &amp;lt;code&amp;gt;target&amp;lt;/code&amp;gt; attribute of the link to &amp;lt;code&amp;gt;_blank&amp;lt;/code&amp;gt; by using the &amp;lt;code&amp;gt;setAttribute&amp;lt;/code&amp;gt; function again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
if ( data.newPage )&lt;br /&gt;
	link.setAttribute( 'target', '_blank' );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the user decided to apply one of the styles from the drop-down list to the link, we have to add this setting to the link element. We will use a JavaScript &amp;lt;code&amp;gt;switch&amp;lt;/code&amp;gt; statement to define the style setting based on the user's choice and use the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dom.element.html#setStyle setStyle]&amp;lt;/code&amp;gt; function to add an appropriate CSS stylesheet rule to the inline &amp;lt;code&amp;gt;style&amp;lt;/code&amp;gt; attribute of the &amp;lt;code&amp;gt;link&amp;lt;/code&amp;gt; element.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
switch( data.style )&lt;br /&gt;
{&lt;br /&gt;
	case 'b' :&lt;br /&gt;
		link.setStyle( 'font-weight', 'bold' );&lt;br /&gt;
	break;&lt;br /&gt;
	case 'u' :&lt;br /&gt;
		link.setStyle( 'text-decoration', 'underline' );&lt;br /&gt;
	break;&lt;br /&gt;
	case 'i' :&lt;br /&gt;
		link.setStyle( 'font-style', 'italic' );&lt;br /&gt;
	break;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We now need to insert the '''Displayed Text''' data (&amp;lt;code&amp;gt;contents&amp;lt;/code&amp;gt;) into the link, in between the &amp;lt;code&amp;gt;&amp;lt;a&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/code&amp;gt; tags. In order to achieve this we will use the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dom.element.html#setHtml setHtml]&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
link.setHtml( data.contents );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, the link object has to be inserted into the document, at the position of the cursor. We will use the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#insertElement insertElement]&amp;lt;/code&amp;gt; function for that.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
editor.insertElement( link );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Full Source Code ==&lt;br /&gt;
To see the full contents of the &amp;lt;code&amp;gt;plugin.js&amp;lt;/code&amp;gt; file, &amp;lt;hide target=&amp;quot;simpleLink_full&amp;quot;&amp;gt;click here&amp;lt;/hide&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;note&amp;gt;You can also [[Media:simpleLink.zip|download the whole plugin folder]] inluding the icon and the fully commented source code.&lt;br /&gt;
&amp;lt;/note&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;simpleLink_full&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
CKEDITOR.plugins.add( 'simpleLink',&lt;br /&gt;
{&lt;br /&gt;
	init: function( editor )&lt;br /&gt;
	{&lt;br /&gt;
		editor.addCommand( 'simpleLinkDialog', new CKEDITOR.dialogCommand( 'simpleLinkDialog' ) );&lt;br /&gt;
		&lt;br /&gt;
		editor.ui.addButton( 'SimpleLink',&lt;br /&gt;
		{&lt;br /&gt;
			label: 'Insert a Link',&lt;br /&gt;
			command: 'simpleLinkDialog',&lt;br /&gt;
			icon: this.path + 'images/icon.png'&lt;br /&gt;
		} );&lt;br /&gt;
		&lt;br /&gt;
		CKEDITOR.dialog.add( 'simpleLinkDialog', function( editor )&lt;br /&gt;
		{&lt;br /&gt;
			return {&lt;br /&gt;
				title : 'Link Properties',&lt;br /&gt;
				minWidth : 400,&lt;br /&gt;
				minHeight : 200,&lt;br /&gt;
				contents :&lt;br /&gt;
				[&lt;br /&gt;
					{&lt;br /&gt;
						id : 'general',&lt;br /&gt;
						label : 'Settings',&lt;br /&gt;
						elements :&lt;br /&gt;
						[&lt;br /&gt;
							{&lt;br /&gt;
								type : 'html',&lt;br /&gt;
								html : 'This dialog window lets you create simple links for your website.'		&lt;br /&gt;
							},&lt;br /&gt;
							{&lt;br /&gt;
								type : 'textarea',&lt;br /&gt;
								id : 'contents',&lt;br /&gt;
								label : 'Displayed Text',&lt;br /&gt;
								validate : CKEDITOR.dialog.validate.notEmpty( 'The Displayed Text field cannot be empty.' ),&lt;br /&gt;
								required : true,&lt;br /&gt;
								commit : function( data )&lt;br /&gt;
								{&lt;br /&gt;
									data.contents = this.getValue();&lt;br /&gt;
								}&lt;br /&gt;
							},&lt;br /&gt;
							{&lt;br /&gt;
								type : 'text',&lt;br /&gt;
								id : 'url',&lt;br /&gt;
								label : 'URL',&lt;br /&gt;
								validate : CKEDITOR.dialog.validate.notEmpty( 'The link must have a URL.' ),&lt;br /&gt;
								required : true,&lt;br /&gt;
								commit : function( data )&lt;br /&gt;
								{&lt;br /&gt;
									data.url = this.getValue();&lt;br /&gt;
								}&lt;br /&gt;
							},&lt;br /&gt;
							{&lt;br /&gt;
								type : 'select',&lt;br /&gt;
								id : 'style',&lt;br /&gt;
								label : 'Style',&lt;br /&gt;
								items : &lt;br /&gt;
								[&lt;br /&gt;
									[ '&amp;lt;none&amp;gt;', '' ],&lt;br /&gt;
									[ 'Bold', 'b' ],&lt;br /&gt;
									[ 'Underline', 'u' ],&lt;br /&gt;
									[ 'Italics', 'i' ]&lt;br /&gt;
								],&lt;br /&gt;
								commit : function( data )&lt;br /&gt;
								{&lt;br /&gt;
									data.style = this.getValue();&lt;br /&gt;
								}&lt;br /&gt;
							},&lt;br /&gt;
							{&lt;br /&gt;
								type : 'checkbox',&lt;br /&gt;
								id : 'newPage',&lt;br /&gt;
								label : 'Opens in a new page',&lt;br /&gt;
								'default' : true,&lt;br /&gt;
								commit : function( data )&lt;br /&gt;
								{&lt;br /&gt;
									data.newPage = this.getValue();&lt;br /&gt;
								}&lt;br /&gt;
							}&lt;br /&gt;
						]&lt;br /&gt;
					}&lt;br /&gt;
				],&lt;br /&gt;
				onOk : function()&lt;br /&gt;
				{&lt;br /&gt;
					var dialog = this,&lt;br /&gt;
						data = {},&lt;br /&gt;
						link = editor.document.createElement( 'a' );&lt;br /&gt;
					this.commitContent( data );&lt;br /&gt;
					&lt;br /&gt;
					link.setAttribute( 'href', data.url );&lt;br /&gt;
					&lt;br /&gt;
					if ( data.newPage )&lt;br /&gt;
						link.setAttribute( 'target', '_blank' );&lt;br /&gt;
					&lt;br /&gt;
					switch( data.style )&lt;br /&gt;
					{&lt;br /&gt;
						case 'b' :&lt;br /&gt;
							link.setStyle( 'font-weight', 'bold' );&lt;br /&gt;
						break;&lt;br /&gt;
						case 'u' :&lt;br /&gt;
							link.setStyle( 'text-decoration', 'underline' );&lt;br /&gt;
						break;&lt;br /&gt;
						case 'i' :&lt;br /&gt;
							link.setStyle( 'font-style', 'italic' );&lt;br /&gt;
						break;&lt;br /&gt;
					}&lt;br /&gt;
					&lt;br /&gt;
					link.setHtml( data.contents );&lt;br /&gt;
					&lt;br /&gt;
					editor.insertElement( link );&lt;br /&gt;
				}&lt;br /&gt;
			};&lt;br /&gt;
		});&lt;br /&gt;
	}&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Working Example ==&lt;br /&gt;
The plugin code is now ready. When you click the '''Insert Link''' toolbar button, the custom '''Link Properties''' dialog window will open. Fill in the obligatory '''Displayed Text''' and '''URL''' fields, and click the '''OK''' button. The checkbox configuring the link to open in a new window is checked by default, but you can uncheck it. You can also change the link style by choosing one of the options from the drop-down list.&lt;br /&gt;
&lt;br /&gt;
[[Image:simpleLink_example1.png|center|frame|Link added in the plugin dialog window]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The newly added link will be inserted into the document and displayed with a style selected in the dialog window.&lt;br /&gt;
&lt;br /&gt;
[[Image:simpleLink_example2.png|center|frame|Link added to the document]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you switched to '''Source''' view, you could see all the information from the plugin dialog window added as link contents and attributes.&lt;br /&gt;
&lt;br /&gt;
[[Image:simpleLink_example3.png|center|frame|Link element shown in the Source view]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Further Enhancements ==&lt;br /&gt;
The SimpleLink plugin is now able to add a new link element to the document by using a custom and simplified dialog window, but does not make it possible to edit an already existing element by using the plugin dialog window. For tips on how to implement this feature along with the context menu support check the [[CKEditor 3.x/Tutorials/Abbr_Plugin_Part_2|Creating a Simple CKEditor Plugin, Part 2 ]] tutorial.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Tutorials/Abbr_Plugin_Part_1&amp;diff=6445</id>
		<title>CKEditor 3.x/Tutorials/Abbr Plugin Part 1</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Tutorials/Abbr_Plugin_Part_1&amp;diff=6445"/>
				<updated>2011-08-10T11:01:56Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: /* Creating an Editor Command */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:Creating a Simple CKEditor Plugin}}&lt;br /&gt;
__TOC__&lt;br /&gt;
The aim of this tutorial is to demonstrate how to create a basic CKEditor plugin.&lt;br /&gt;
 &lt;br /&gt;
We are going to develop an '''abbreviation plugin''' that lets the user insert abbreviations into their documents. The abbreviations will be using the &amp;lt;code&amp;gt;abbr&amp;lt;/code&amp;gt; HTML element and will be added through a dialog window that is opened after clicking a dedicated toolbar button.&lt;br /&gt;
&lt;br /&gt;
The plugin will be named &amp;lt;code&amp;gt;'''abbr'''&amp;lt;/code&amp;gt;, just like the name of the corresponding HTML element that we are going to use in its implementation.&lt;br /&gt;
&lt;br /&gt;
== Plugin Files ==&lt;br /&gt;
Firstly, we will need to create the &amp;lt;code&amp;gt;abbr&amp;lt;/code&amp;gt; folder inside the &amp;lt;code&amp;gt;plugins&amp;lt;/code&amp;gt; directory of the CKEditor installation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;note&amp;gt;Remember that for CKEditor the name of the plugin folder is important and has to be the same as the name of the plugin, otherwise the editor will not be able to recognize it.&amp;lt;/note&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inside the newly created &amp;lt;code&amp;gt;abbr&amp;lt;/code&amp;gt; folder we are going to place the &amp;lt;code&amp;gt;plugin.js&amp;lt;/code&amp;gt; file that will contain the plugin logic. Apart from that, since we will also need a toolbar icon for our plugin, we are going to add an &amp;lt;code&amp;gt;images&amp;lt;/code&amp;gt; folder and subsequently place the &amp;lt;code&amp;gt;icon.png&amp;lt;/code&amp;gt; file inside.&lt;br /&gt;
&lt;br /&gt;
To sum up, we will need the following file structure for our plugin to work:&lt;br /&gt;
* &amp;lt;code&amp;gt;''ckeditor root''&amp;lt;/code&amp;gt;&lt;br /&gt;
** &amp;lt;code&amp;gt;plugins&amp;lt;/code&amp;gt;&lt;br /&gt;
*** &amp;lt;code&amp;gt;abbr&amp;lt;/code&amp;gt;&lt;br /&gt;
**** &amp;lt;code&amp;gt;images&amp;lt;/code&amp;gt;&lt;br /&gt;
***** &amp;lt;code&amp;gt;icon.png&amp;lt;/code&amp;gt;&lt;br /&gt;
**** &amp;lt;code&amp;gt;plugin.js&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Plugin Source Code ==&lt;br /&gt;
With the following structure ready, it is time to open the &amp;lt;code&amp;gt;plugin.js&amp;lt;/code&amp;gt; file in a text editor and to start creating the source code of the plugin.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
CKEDITOR.plugins.add( 'abbr',&lt;br /&gt;
{&lt;br /&gt;
	init: function( editor )&lt;br /&gt;
	{&lt;br /&gt;
		// Plugin logic goes here...&lt;br /&gt;
	}&lt;br /&gt;
} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All CKEditor plugins are created by using the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.resourceManager.html#add CKEDITOR.plugins.add]&amp;lt;/code&amp;gt; function. This function should contain the plugin name (&amp;lt;code&amp;gt;'abbr'&amp;lt;/code&amp;gt;) and the plugin logic placed inside the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.pluginDefinition.html#init init]&amp;lt;/code&amp;gt; function that is called upon the initialization of the editor instance.&lt;br /&gt;
&lt;br /&gt;
=== Creating an Editor Command ===&lt;br /&gt;
We want our plugin to have a dialog window, so we need to define an editor command that opens a new dialog window. To do this, we will need to use the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#addCommand  addCommand]&amp;lt;/code&amp;gt; function to register the &amp;lt;code&amp;gt;abbrDialog&amp;lt;/code&amp;gt; command. That command opens the &amp;lt;code&amp;gt;abbrDialog&amp;lt;/code&amp;gt; dialog that we are going to define in a moment by using the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialogCommand.html CKEDITOR.dialogCommand]&amp;lt;/code&amp;gt; class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
editor.addCommand( 'abbrDialog', new CKEDITOR.dialogCommand( 'abbrDialog' ) );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a Toolbar Button ===&lt;br /&gt;
The plugin dialog window is to be opened by using a toolbar button. To this end, we need to define a button that will be associated with the dialog window. The &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.ui.html#addButton CKEditor.ui.addButton]&amp;lt;/code&amp;gt; function accepts a button name (&amp;lt;code&amp;gt;'Abbr'&amp;lt;/code&amp;gt;) along with the definition of the tooltip text (&amp;lt;code&amp;gt;label&amp;lt;/code&amp;gt;) and the button icon (&amp;lt;code&amp;gt;icon&amp;lt;/code&amp;gt;). Note that &amp;lt;code&amp;gt;this.path&amp;lt;/code&amp;gt; is the directory where the &amp;lt;code&amp;gt;plugin.js&amp;lt;/code&amp;gt; file resides.&lt;br /&gt;
&lt;br /&gt;
These parameters are responsible for the button presentation. To make the button actually work, we need to connect it to the plugin command name defined above by using the &amp;lt;code&amp;gt;command&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
editor.ui.addButton( 'Abbr',&lt;br /&gt;
{&lt;br /&gt;
	label: 'Insert Abbreviation',&lt;br /&gt;
	command: 'abbrDialog',&lt;br /&gt;
	icon: this.path + 'images/icon.png'&lt;br /&gt;
} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CKEditor Initialization ===&lt;br /&gt;
It is now time to initialize a CKEditor instance that will use the Abbreviation plugin along with its toolbar button.&lt;br /&gt;
&lt;br /&gt;
To register the plugin with CKEditor, we have to add it to the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.extraPlugins extraPlugins]&amp;lt;/code&amp;gt; list. We also need to enhance the toolbar definition and add the plugin button by using the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.toolbar toolbar]&amp;lt;/code&amp;gt; parameter. &lt;br /&gt;
&lt;br /&gt;
Open the page that will contain CKEditor in a text editor and insert a CKEditor instance using the following toolbar and plugin configuration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
//&amp;lt;![CDATA[&lt;br /&gt;
	// Replace the &amp;lt;textarea id=&amp;quot;editor1&amp;quot;&amp;gt; with a CKEditor&lt;br /&gt;
	// instance, using default configuration.&lt;br /&gt;
	CKEDITOR.replace( 'editor1',&lt;br /&gt;
		{&lt;br /&gt;
			extraPlugins : 'abbr',&lt;br /&gt;
			toolbar :&lt;br /&gt;
			[&lt;br /&gt;
				['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink'],&lt;br /&gt;
				['About','-','Abbr']&lt;br /&gt;
			]&lt;br /&gt;
		});&lt;br /&gt;
//]]&amp;gt;&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you load the page containing the above CKEditor instance, you should be able to see the new plugin toolbar button along with its tooltip.&lt;br /&gt;
&lt;br /&gt;
[[Image:abbr_button_added.png|center|frame|Abbreviation plugin button added to CKEditor toolbar]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plugin Dialog Window ===&lt;br /&gt;
Clicking the button should open the &amp;lt;code&amp;gt;abbrDialog&amp;lt;/code&amp;gt; dialog window. First, however, we need to return to the Abbreviation plugin source file and define the dialog window by using the  &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.html#.add CKEDITOR.dialog.add]&amp;lt;/code&amp;gt; function. To see all dialog window definition elements, refer to the [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.dialogDefinition.html CKEditor JavaScript API].&lt;br /&gt;
&lt;br /&gt;
In our case we will give the dialog window a name (&amp;lt;code&amp;gt;'abbrDialog'&amp;lt;/code&amp;gt;) and use the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.dialogDefinition.html#title title]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.dialogDefinition.html#minWidth minWidth]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.dialogDefinition.html#minHeight minHeight]&amp;lt;/code&amp;gt; parameters to define its title and minimum dimensions, respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;note&amp;gt;The name selected for the dialog window is the name that appears in the &amp;lt;code&amp;gt;addCommand&amp;lt;/code&amp;gt; function above.&lt;br /&gt;
&amp;lt;/note&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Dialog Window Tabs ====&lt;br /&gt;
The dialog window should also contain some [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.dialogDefinition.html#contents  contents], so we will begin with [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.contentDefinition.html adding] two tabs along with their labels. Note that by default CKEditor also adds the standard '''OK''' and '''Cancel''' buttons.&lt;br /&gt;
&lt;br /&gt;
In order to create the Abbreviation plugin dialog window along with two tabs, add the following code in the &amp;lt;code&amp;gt;plugin.js&amp;lt;/code&amp;gt; file below the plugin toolbar button definition.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
CKEDITOR.dialog.add( 'abbrDialog', function ( editor )&lt;br /&gt;
{&lt;br /&gt;
	return {&lt;br /&gt;
		title : 'Abbreviation Properties',&lt;br /&gt;
		minWidth : 400,&lt;br /&gt;
		minHeight : 200,&lt;br /&gt;
&lt;br /&gt;
		contents :&lt;br /&gt;
		[&lt;br /&gt;
			{&lt;br /&gt;
				id : 'tab1',&lt;br /&gt;
				label : 'Basic Settings',&lt;br /&gt;
				elements :&lt;br /&gt;
				[&lt;br /&gt;
					// UI elements of the first tab	will be defined here &lt;br /&gt;
				]&lt;br /&gt;
			},&lt;br /&gt;
			{&lt;br /&gt;
				id : 'tab2',&lt;br /&gt;
				label : 'Advanced Settings',&lt;br /&gt;
				elements :&lt;br /&gt;
				[&lt;br /&gt;
					// UI elements of the second tab will be defined here&lt;br /&gt;
				]&lt;br /&gt;
			}&lt;br /&gt;
		]&lt;br /&gt;
	};&lt;br /&gt;
} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The result of this change can be seen immediately. Click the '''Insert Abbreviation''' toolbar button in order to open the newly created '''Abbreviation Properties''' dialog window containing two (empty) tabs.&lt;br /&gt;
&lt;br /&gt;
[[Image:abbr_empty_tabs.png|center|frame|A plugin dialog window with two tabs added]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Dialog Window Tabs Elements ====&lt;br /&gt;
User interface elements that can be added to a dialog window tab are defined in the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.contentDefinition.html#elements elements]&amp;lt;/code&amp;gt; parameter, which is an array of &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.uiElementDefinition.html CKEDITOR.dialog.uiElementDefinition]&amp;lt;/code&amp;gt; objects.&lt;br /&gt;
&lt;br /&gt;
The '''Basic Settings''' tab will contain two mandatory text fields (&amp;lt;code&amp;gt;type : 'text'&amp;lt;/code&amp;gt;) with the abbreviation and its explanation. Since both fields are obligatory, it is useful to add a simple validation mechanism in order to ensure that the user fills them.&lt;br /&gt;
&lt;br /&gt;
The '''Advanced Settings''' tab will contain a single optional text field that allows the user to assign an &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; to the abbreviation element.&lt;br /&gt;
&lt;br /&gt;
The code snippet presented below shows a full definition of the contents of both plugin tabs.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
contents :&lt;br /&gt;
[&lt;br /&gt;
	{&lt;br /&gt;
		id : 'tab1',&lt;br /&gt;
		label : 'Basic Settings',&lt;br /&gt;
		elements :&lt;br /&gt;
		[&lt;br /&gt;
			{&lt;br /&gt;
				type : 'text',&lt;br /&gt;
				id : 'abbr',&lt;br /&gt;
				label : 'Abbreviation',&lt;br /&gt;
				validate : CKEDITOR.dialog.validate.notEmpty( &amp;quot;Abbreviation field cannot be empty&amp;quot; )&lt;br /&gt;
			},&lt;br /&gt;
			{&lt;br /&gt;
				type : 'text',&lt;br /&gt;
				id : 'title',&lt;br /&gt;
				label : 'Explanation',&lt;br /&gt;
				validate : CKEDITOR.dialog.validate.notEmpty( &amp;quot;Explanation field cannot be empty&amp;quot; )&lt;br /&gt;
			}	 &lt;br /&gt;
		]&lt;br /&gt;
	},&lt;br /&gt;
	{&lt;br /&gt;
		id : 'tab2',&lt;br /&gt;
		label : 'Advanced Settings',&lt;br /&gt;
		elements :&lt;br /&gt;
		[&lt;br /&gt;
			{&lt;br /&gt;
				type : 'text',&lt;br /&gt;
				id : 'id',&lt;br /&gt;
				label : 'Id'&lt;br /&gt;
			}&lt;br /&gt;
		]&lt;br /&gt;
	}&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you reload the editor instance and open the '''Abbreviation Properties''' dialog window, the '''Basic Settings''' tab will now contain two mandatory text fields.&lt;br /&gt;
&lt;br /&gt;
[[Image:abbr_basic_settings_tab.png|center|frame|Basic Settings tab of the Abbreviation plugin]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''Advanced Settings''' tab only contains a single &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; text field that can be left empty.&lt;br /&gt;
&lt;br /&gt;
[[Image:abbr_advanced_settings_tab.png|center|frame|Advanced Settings tab of the Abbreviation plugin]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plugin Behavior ===&lt;br /&gt;
The presentation layer of the plugin is now ready, so we can define the plugin behavior to actually make it work.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.dialogDefinition.html#onOk onOk]&amp;lt;/code&amp;gt; method is invoked once the user accepts the changes introduced in the dialog window by clicking the '''OK''' button or pressing the ''Enter'' key on the keyboard. Since the plugin adds a new &amp;lt;code&amp;gt;abbr&amp;lt;/code&amp;gt; element to the DOM tree, we can use the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dom.document.html#createElement  createElement]&amp;lt;/code&amp;gt; function to create a new DOM element.&lt;br /&gt;
&lt;br /&gt;
With the new DOM element created, we can now retrieve the values of the &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; and (optional) &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; fields with the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.html#getValueOf getValueOf]&amp;lt;/code&amp;gt; function and pass them to appropriate &amp;lt;code&amp;gt;abbr&amp;lt;/code&amp;gt; element attributes by using the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dom.element.html#setAttribute  setAttribute]&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
Finally, we will pass the text entered in the &amp;lt;code&amp;gt;abbr&amp;lt;/code&amp;gt; text field as the contents of the &amp;lt;code&amp;gt;abbr&amp;lt;/code&amp;gt; element by using the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dom.element.html#setText setText]&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
With the contents of the &amp;lt;code&amp;gt;abbr&amp;lt;/code&amp;gt; element ready, we can insert it into the document at the location of the cursor by using the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#insertElement insertElement]&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
Add the following &amp;lt;code&amp;gt;onOk&amp;lt;/code&amp;gt; function code to your dialog window definition, below the code that creates the contents of the dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
onOk : function()&lt;br /&gt;
{&lt;br /&gt;
	var dialog = this;&lt;br /&gt;
	var abbr = editor.document.createElement( 'abbr' );&lt;br /&gt;
&lt;br /&gt;
	abbr.setAttribute( 'title', dialog.getValueOf( 'tab1', 'title' ) );&lt;br /&gt;
	abbr.setText( dialog.getValueOf( 'tab1', 'abbr' ) );&lt;br /&gt;
&lt;br /&gt;
	var id = dialog.getValueOf( 'tab2', 'id' );&lt;br /&gt;
	if ( id )&lt;br /&gt;
		abbr.setAttribute( 'id', id );&lt;br /&gt;
&lt;br /&gt;
	editor.insertElement( abbr );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;note&amp;gt;Please note that another way to insert HTML code into CKEditor is using the &amp;lt;code&amp;gt;[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#insertHtml insertHtml]&amp;lt;/code&amp;gt; function that adds HTML code at the location of the cursor in the document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
editor.insertHtml( '&amp;lt;h2&amp;gt;This is a sample header&amp;lt;/h2&amp;gt;&amp;lt;p&amp;gt;This is a sample paragraph.&amp;lt;/p&amp;gt;' );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/note&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Full Source Code ==&lt;br /&gt;
To see the full contents of the &amp;lt;code&amp;gt;plugin.js&amp;lt;/code&amp;gt; file, &amp;lt;hide target=&amp;quot;abbr_full&amp;quot;&amp;gt;click here&amp;lt;/hide&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;note&amp;gt;You can also [[Media:abbr.zip|download the whole plugin folder]] inluding the icon and the fully commented source code.&lt;br /&gt;
&amp;lt;/note&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;abbr_full&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
CKEDITOR.plugins.add( 'abbr',&lt;br /&gt;
{&lt;br /&gt;
	init: function( editor )&lt;br /&gt;
	{&lt;br /&gt;
		editor.addCommand( 'abbrDialog',new CKEDITOR.dialogCommand( 'abbrDialog' ) );&lt;br /&gt;
		editor.ui.addButton( 'Abbr',&lt;br /&gt;
		{&lt;br /&gt;
			label: 'Insert Abbreviation',&lt;br /&gt;
			command: 'abbrDialog',&lt;br /&gt;
			icon: this.path + 'images/icon.png'&lt;br /&gt;
		} );&lt;br /&gt;
		CKEDITOR.dialog.add( 'abbrDialog', function( editor )&lt;br /&gt;
		{&lt;br /&gt;
			return {&lt;br /&gt;
				title : 'Abbreviation Properties',&lt;br /&gt;
				minWidth : 400,&lt;br /&gt;
				minHeight : 200,&lt;br /&gt;
				contents :&lt;br /&gt;
				[&lt;br /&gt;
					{&lt;br /&gt;
						id : 'tab1',&lt;br /&gt;
						label : 'Basic Settings',&lt;br /&gt;
						elements :&lt;br /&gt;
						[&lt;br /&gt;
							{&lt;br /&gt;
								type : 'text',&lt;br /&gt;
								id : 'abbr',&lt;br /&gt;
								label : 'Abbreviation',&lt;br /&gt;
								validate : CKEDITOR.dialog.validate.notEmpty( &amp;quot;Abbreviation field cannot be empty&amp;quot; )&lt;br /&gt;
							},&lt;br /&gt;
							{&lt;br /&gt;
								type : 'text',&lt;br /&gt;
								id : 'title',&lt;br /&gt;
								label : 'Explanation',&lt;br /&gt;
								validate : CKEDITOR.dialog.validate.notEmpty( &amp;quot;Explanation field cannot be empty&amp;quot; )&lt;br /&gt;
							}	 &lt;br /&gt;
						]&lt;br /&gt;
					},&lt;br /&gt;
					{&lt;br /&gt;
						id : 'tab2',&lt;br /&gt;
						label : 'Advanced Settings',&lt;br /&gt;
						elements :&lt;br /&gt;
						[&lt;br /&gt;
							{&lt;br /&gt;
								type : 'text',&lt;br /&gt;
								id : 'id',&lt;br /&gt;
								label : 'Id'&lt;br /&gt;
							}&lt;br /&gt;
						]&lt;br /&gt;
					}&lt;br /&gt;
				],&lt;br /&gt;
				onOk : function()&lt;br /&gt;
				{&lt;br /&gt;
					var dialog = this;&lt;br /&gt;
&lt;br /&gt;
					var abbr = editor.document.createElement( 'abbr' );&lt;br /&gt;
					abbr.setAttribute( 'title', dialog.getValueOf( 'tab1', 'title' ) );&lt;br /&gt;
					abbr.setText( dialog.getValueOf( 'tab1', 'abbr' ) );&lt;br /&gt;
					var id = dialog.getValueOf( 'tab2', 'id' );&lt;br /&gt;
					if ( id )&lt;br /&gt;
						abbr.setAttribute( 'id', id );&lt;br /&gt;
					editor.insertElement( abbr );&lt;br /&gt;
				}&lt;br /&gt;
			};&lt;br /&gt;
		} );&lt;br /&gt;
	}&lt;br /&gt;
} );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Working Example ==&lt;br /&gt;
The plugin code is now ready. When you click the '''Insert Abbreviation''' toolbar button, the '''Abbreviation Properties''' dialog window will open. Fill in the obligatory '''Abbreviation''' and '''Explanation''' fields and click the '''OK''' button.&lt;br /&gt;
&lt;br /&gt;
[[Image:abbr_example1.png|center|frame|Abbreviation added in the dialog window]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The newly added abbreviation will be inserted into the document and will be displayed using the default styling of your browser. In Firefox, for example, the abbreviation will be underlined using a dotted line and the explanation will be displayed in a tooltip.&lt;br /&gt;
&lt;br /&gt;
[[Image:abbr_example2.png|center|frame|Abbreviation added in the dialog window]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Further Enhancements ==&lt;br /&gt;
The Abbreviation plugin is now able to add a new &amp;lt;code&amp;gt;abbr&amp;lt;/code&amp;gt; element to the document, but does not make it possible to edit an already existing element. For this feature along with the context menu support check the [[CKEditor 3.x/Tutorials/Abbr_Plugin_Part_2|second part of the tutorial]].&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=Talk:CKEditor_3.x/Howto/Default_Field_Values&amp;diff=5803</id>
		<title>Talk:CKEditor 3.x/Howto/Default Field Values</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=Talk:CKEditor_3.x/Howto/Default_Field_Values&amp;diff=5803"/>
				<updated>2011-02-14T19:53:17Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Title is misleading&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Title is misleading ==&lt;br /&gt;
&lt;br /&gt;
The page title, &amp;quot;How Do I Set a Default Value for a CKEditor Dialog Window Field?&amp;quot;, is misleading. When looking at the HOWTOs list, I understood that it would explain how to set the default value of '''existing dialogs'''. But instead it talks about '''custom''' dialogs.&lt;br /&gt;
&lt;br /&gt;
Maybe &amp;quot;How Do I Set a Default Value for a '''Custom''' CKEditor Dialog Window Field?&amp;quot;? --[[User:Fredck|FredCK]] 19:53, 14 February 2011 (UTC)&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide/Data_Processor&amp;diff=4436</id>
		<title>CKEditor 3.x/Developers Guide/Data Processor</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide/Data_Processor&amp;diff=4436"/>
				<updated>2010-10-20T15:32:39Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: /* HTML Parser Filters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:Data Processor: Data Input and Output Manipulation}}CKEditor is a '''browser based''' editor. It means it uses the browser infrastructure to create its editing environment. Because of this the editing area in the editor is simply an HTML page that's manipulated by the user by typing or by using the editor features. Technically speaking, CKEditor is performing [http://en.wikipedia.org/wiki/Document_Object_Model DOM] manipulation on the page contents.&lt;br /&gt;
&lt;br /&gt;
Even if CKEditor uses HTML and the browser DOM as its base for editing, it is possible to input and output any kind of data on it. This data transformation is handled by the so called &amp;quot;Data Processor&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== The Data Processor ==&lt;br /&gt;
&lt;br /&gt;
The Data Processor is an object, in the JavaScript point of view, which transforms the input data into HTML, and back to the output data format later. This transformation is provided by the [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dataProcessor.html#toHtml toHtml] and [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dataProcessor.html#toDataFormat toDataFormat] functions, respectively.&lt;br /&gt;
&lt;br /&gt;
[[File:CKEditor_Data_Processor.png]]&lt;br /&gt;
&lt;br /&gt;
== The Default Data Processor: XHTML ==&lt;br /&gt;
&lt;br /&gt;
CKEditor is distributed with an XHTML Data Processor. This may sound strange, but it transforms the (X)HTML data inputted in the editor into &amp;quot;good&amp;quot; HTML. In this process it also makes some transformations required by some of the editor features. &lt;br /&gt;
&lt;br /&gt;
The XHTML Data Processor is quite a complex, and flexible, piece of program. It's composed by several parts:&lt;br /&gt;
&lt;br /&gt;
[[File:CKEditor_XHTML_Data_Processor.png]]&lt;br /&gt;
&lt;br /&gt;
* HTML Parser: reads the HTML inputted in the editor, transforming it into &amp;quot;good&amp;quot; html. It also transforms the HTML string into a JavaScript object tree, to be manipulated by &amp;quot;filters&amp;quot;. See [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.htmlParser.html CKEDITOR.htmlParser].&lt;br /&gt;
&lt;br /&gt;
* HTML Writer: outputs strings in HTML format based on the object tree representation of the data.&lt;br /&gt;
Note that the HTML Parser is used on output as well, when retrieving the HTML from the browser. This is needed because browsers, especially IE, may produce bad quality code.&lt;br /&gt;
&lt;br /&gt;
The default Data Processor can be retrieved and manipulated by the [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#dataProcessor editor.dataProcessor] property.&lt;br /&gt;
&lt;br /&gt;
== HTML Parser Filters ==&lt;br /&gt;
&lt;br /&gt;
Filters are one of the powerful features available on the HTML Parser. They're applied to the object representation of the parsed HTML data when transforming it back to strings. &lt;br /&gt;
&lt;br /&gt;
Some of the application of filters are:&lt;br /&gt;
&lt;br /&gt;
* Remove attributes from elements.&lt;br /&gt;
* Rewrite elements attributes values.&lt;br /&gt;
* Rename element names or attributes.&lt;br /&gt;
* Add missing attributes to elements.&lt;br /&gt;
* Etc...&lt;br /&gt;
&lt;br /&gt;
The default XHTML Data Processor already applies several filters either on input and on output of data. You can extend it by adding custom filter rules (calling addRules()) to the following objects:&lt;br /&gt;
&lt;br /&gt;
* editor.dataProcessor.dataFilter: filter applied to the input data when transforming it to HTML to be loaded into the editor (&amp;quot;on input&amp;quot;).&lt;br /&gt;
* editor.dataProcessor.htmlFilter: filter applied to the HTML available in the editor when transforming it on the XHTML outputted by the editor (&amp;quot;on output&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
For example, the following code will ensure that &amp;amp;lt;img&amp;amp;gt; elements will have their &amp;quot;alt&amp;quot; attribute filled:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
editor.dataProcessor.htmlFilter.addRules(&lt;br /&gt;
    {&lt;br /&gt;
        elements :&lt;br /&gt;
        {&lt;br /&gt;
            img : function( element )&lt;br /&gt;
            {&lt;br /&gt;
                if ( !element.attributes.alt )&lt;br /&gt;
                    element.attributes.alt = 'An image';&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    });&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Custom Data Processors ==&lt;br /&gt;
&lt;br /&gt;
Plugin implementers can create data processors, which can transform custom non HTML data formats to be loaded and outputted by the editor. For example, there could be data processors for [http://en.wikipedia.org/wiki/BBCode BBCode], [http://en.wikipedia.org/wiki/Wiki_markup Wiki markup], or any other kind of structured data markup. Even server side transformation could be considered, by executing [http://en.wikipedia.org/wiki/XMLHttpRequest Ajax style calls] from the data processor code.&lt;br /&gt;
&lt;br /&gt;
To make the editor use a custom data processor, it's enough to set [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#dataProcessor editor.dataProcessor] to an object implementing the [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dataProcessor.html data processor interface], replacing the default XHTML Data Processor.&lt;br /&gt;
&lt;br /&gt;
Custom data processors may use parts of the default XHTML Data Processor code, including the HTML Parser or even the HTML Writer. It's recommended checking the [http://dev.ckeditor.com/browser/CKEditor/trunk/_source/plugins/htmldataprocessor/plugin.js htmldataprocessor plugin code] for reference and ideas.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide/Data_Processor&amp;diff=4435</id>
		<title>CKEditor 3.x/Developers Guide/Data Processor</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide/Data_Processor&amp;diff=4435"/>
				<updated>2010-10-20T15:24:40Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:Data Processor: Data Input and Output Manipulation}}CKEditor is a '''browser based''' editor. It means it uses the browser infrastructure to create its editing environment. Because of this the editing area in the editor is simply an HTML page that's manipulated by the user by typing or by using the editor features. Technically speaking, CKEditor is performing [http://en.wikipedia.org/wiki/Document_Object_Model DOM] manipulation on the page contents.&lt;br /&gt;
&lt;br /&gt;
Even if CKEditor uses HTML and the browser DOM as its base for editing, it is possible to input and output any kind of data on it. This data transformation is handled by the so called &amp;quot;Data Processor&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== The Data Processor ==&lt;br /&gt;
&lt;br /&gt;
The Data Processor is an object, in the JavaScript point of view, which transforms the input data into HTML, and back to the output data format later. This transformation is provided by the [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dataProcessor.html#toHtml toHtml] and [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dataProcessor.html#toDataFormat toDataFormat] functions, respectively.&lt;br /&gt;
&lt;br /&gt;
[[File:CKEditor_Data_Processor.png]]&lt;br /&gt;
&lt;br /&gt;
== The Default Data Processor: XHTML ==&lt;br /&gt;
&lt;br /&gt;
CKEditor is distributed with an XHTML Data Processor. This may sound strange, but it transforms the (X)HTML data inputted in the editor into &amp;quot;good&amp;quot; HTML. In this process it also makes some transformations required by some of the editor features. &lt;br /&gt;
&lt;br /&gt;
The XHTML Data Processor is quite a complex, and flexible, piece of program. It's composed by several parts:&lt;br /&gt;
&lt;br /&gt;
[[File:CKEditor_XHTML_Data_Processor.png]]&lt;br /&gt;
&lt;br /&gt;
* HTML Parser: reads the HTML inputted in the editor, transforming it into &amp;quot;good&amp;quot; html. It also transforms the HTML string into a JavaScript object tree, to be manipulated by &amp;quot;filters&amp;quot;. See [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.htmlParser.html CKEDITOR.htmlParser].&lt;br /&gt;
&lt;br /&gt;
* HTML Writer: outputs strings in HTML format based on the object tree representation of the data.&lt;br /&gt;
Note that the HTML Parser is used on output as well, when retrieving the HTML from the browser. This is needed because browsers, especially IE, may produce bad quality code.&lt;br /&gt;
&lt;br /&gt;
The default Data Processor can be retrieved and manipulated by the [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#dataProcessor editor.dataProcessor] property.&lt;br /&gt;
&lt;br /&gt;
== HTML Parser Filters ==&lt;br /&gt;
&lt;br /&gt;
Filters are one of the powerful features available on the HTML Parser. They're applied to the object representation of the parsed HTML data when transforming it back to strings. &lt;br /&gt;
&lt;br /&gt;
Some of the application of filters are:&lt;br /&gt;
&lt;br /&gt;
* Remove attributes from elements.&lt;br /&gt;
* Rewrite elements attributes values.&lt;br /&gt;
* Rename element names or attributes.&lt;br /&gt;
* Add missing attributes to elements.&lt;br /&gt;
* Etc...&lt;br /&gt;
&lt;br /&gt;
The default XHTML Data Processor already applies several filters either on input and on output of data. You can extend it by adding custom filter rules (calling addRules()) to the following objects:&lt;br /&gt;
&lt;br /&gt;
* editor.dataProcessor.dataFilter: filter applied to the input data when transforming it to HTML to be loaded into the editor (&amp;quot;on input&amp;quot;).&lt;br /&gt;
* editor.dataProcessor.htmlFilter: filter applied to the HTML available in the editor when transforming it on the XHTML outputted by the editor (&amp;quot;on output&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
For example, the following code will ensure that &amp;amp;lt;img&amp;amp;gt; elements will have their &amp;quot;alt&amp;quot; attribute filled:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
editor.dataProcessor.htmlFilter.addRules(&lt;br /&gt;
    {&lt;br /&gt;
        elements :&lt;br /&gt;
        {&lt;br /&gt;
            img : function( element )&lt;br /&gt;
            {&lt;br /&gt;
                if ( !element.attributes.alt )&lt;br /&gt;
                    elements.attributes.alt = 'An image';&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    });&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Custom Data Processors ==&lt;br /&gt;
&lt;br /&gt;
Plugin implementers can create data processors, which can transform custom non HTML data formats to be loaded and outputted by the editor. For example, there could be data processors for [http://en.wikipedia.org/wiki/BBCode BBCode], [http://en.wikipedia.org/wiki/Wiki_markup Wiki markup], or any other kind of structured data markup. Even server side transformation could be considered, by executing [http://en.wikipedia.org/wiki/XMLHttpRequest Ajax style calls] from the data processor code.&lt;br /&gt;
&lt;br /&gt;
To make the editor use a custom data processor, it's enough to set [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#dataProcessor editor.dataProcessor] to an object implementing the [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dataProcessor.html data processor interface], replacing the default XHTML Data Processor.&lt;br /&gt;
&lt;br /&gt;
Custom data processors may use parts of the default XHTML Data Processor code, including the HTML Parser or even the HTML Writer. It's recommended checking the [http://dev.ckeditor.com/browser/CKEditor/trunk/_source/plugins/htmldataprocessor/plugin.js htmldataprocessor plugin code] for reference and ideas.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide/Data_Processor&amp;diff=4434</id>
		<title>CKEditor 3.x/Developers Guide/Data Processor</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide/Data_Processor&amp;diff=4434"/>
				<updated>2010-10-20T15:23:30Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Created page with 'CKEditor is a '''browser based''' editor. It means it uses the browser infrastructure to create its editing environment. Because of this the editing area in the editor is simply …'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CKEditor is a '''browser based''' editor. It means it uses the browser infrastructure to create its editing environment. Because of this the editing area in the editor is simply an HTML page that's manipulated by the user by typing or by using the editor features. Technically speaking, CKEditor is performing [http://en.wikipedia.org/wiki/Document_Object_Model DOM] manipulation on the page contents.&lt;br /&gt;
&lt;br /&gt;
Even if CKEditor uses HTML and the browser DOM as its base for editing, it is possible to input and output any kind of data on it. This data transformation is handled by the so called &amp;quot;Data Processor&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== The Data Processor ==&lt;br /&gt;
&lt;br /&gt;
The Data Processor is an object, in the JavaScript point of view, which transforms the input data into HTML, and back to the output data format later. This transformation is provided by the [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dataProcessor.html#toHtml toHtml] and [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dataProcessor.html#toDataFormat toDataFormat] functions, respectively.&lt;br /&gt;
&lt;br /&gt;
[[File:CKEditor_Data_Processor.png]]&lt;br /&gt;
&lt;br /&gt;
== The Default Data Processor: XHTML ==&lt;br /&gt;
&lt;br /&gt;
CKEditor is distributed with an XHTML Data Processor. This may sound strange, but it transforms the (X)HTML data inputted in the editor into &amp;quot;good&amp;quot; HTML. In this process it also makes some transformations required by some of the editor features. &lt;br /&gt;
&lt;br /&gt;
The XHTML Data Processor is quite a complex, and flexible, piece of program. It's composed by several parts:&lt;br /&gt;
&lt;br /&gt;
[[File:CKEditor_XHTML_Data_Processor.png]]&lt;br /&gt;
&lt;br /&gt;
* HTML Parser: reads the HTML inputted in the editor, transforming it into &amp;quot;good&amp;quot; html. It also transforms the HTML string into a JavaScript object tree, to be manipulated by &amp;quot;filters&amp;quot;. See [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.htmlParser.html CKEDITOR.htmlParser].&lt;br /&gt;
&lt;br /&gt;
* HTML Writer: outputs strings in HTML format based on the object tree representation of the data.&lt;br /&gt;
Note that the HTML Parser is used on output as well, when retrieving the HTML from the browser. This is needed because browsers, especially IE, may produce bad quality code.&lt;br /&gt;
&lt;br /&gt;
The default Data Processor can be retrieved and manipulated by the [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#dataProcessor editor.dataProcessor] property.&lt;br /&gt;
&lt;br /&gt;
== HTML Parser Filters ==&lt;br /&gt;
&lt;br /&gt;
Filters are one of the powerful features available on the HTML Parser. They're applied to the object representation of the parsed HTML data when transforming it back to strings. &lt;br /&gt;
&lt;br /&gt;
Some of the application of filters are:&lt;br /&gt;
&lt;br /&gt;
* Remove attributes from elements.&lt;br /&gt;
* Rewrite elements attributes values.&lt;br /&gt;
* Rename element names or attributes.&lt;br /&gt;
* Add missing attributes to elements.&lt;br /&gt;
* Etc...&lt;br /&gt;
&lt;br /&gt;
The default XHTML Data Processor already applies several filters either on input and on output of data. You can extend it by adding custom filter rules (calling addRules()) to the following objects:&lt;br /&gt;
&lt;br /&gt;
* editor.dataProcessor.dataFilter: filter applied to the input data when transforming it to HTML to be loaded into the editor (&amp;quot;on input&amp;quot;).&lt;br /&gt;
* editor.dataProcessor.htmlFilter: filter applied to the HTML available in the editor when transforming it on the XHTML outputted by the editor (&amp;quot;on output&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
For example, the following code will ensure that &amp;amp;lt;img&amp;amp;gt; elements will have their &amp;quot;alt&amp;quot; attribute filled:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
editor.dataProcessor.htmlFilter.addRules(&lt;br /&gt;
    {&lt;br /&gt;
        elements :&lt;br /&gt;
        {&lt;br /&gt;
            img : function( element )&lt;br /&gt;
            {&lt;br /&gt;
                if ( !element.attributes.alt )&lt;br /&gt;
                    elements.attributes.alt = 'An image';&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    });&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Custom Data Processors ==&lt;br /&gt;
&lt;br /&gt;
Plugin implementers can create data processors, which can transform custom non HTML data formats to be loaded and outputted by the editor. For example, there could be data processors for [http://en.wikipedia.org/wiki/BBCode BBCode], [http://en.wikipedia.org/wiki/Wiki_markup Wiki markup], or any other kind of structured data markup. Even server side transformation could be considered, by executing [http://en.wikipedia.org/wiki/XMLHttpRequest Ajax style calls] from the data processor code.&lt;br /&gt;
&lt;br /&gt;
To make the editor use a custom data processor, it's enough to set [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#dataProcessor editor.dataProcessor] to an object implementing the [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dataProcessor.html data processor interface], replacing the default XHTML Data Processor.&lt;br /&gt;
&lt;br /&gt;
Custom data processors may use parts of the default XHTML Data Processor code, including the HTML Parser or even the HTML Writer. It's recommended checking the [http://dev.ckeditor.com/browser/CKEditor/trunk/_source/plugins/htmldataprocessor/plugin.js htmldataprocessor plugin code] for reference and ideas.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=File:CKEditor_XHTML_Data_Processor.png&amp;diff=4433</id>
		<title>File:CKEditor XHTML Data Processor.png</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=File:CKEditor_XHTML_Data_Processor.png&amp;diff=4433"/>
				<updated>2010-10-20T15:06:12Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: uploaded a new version of &amp;quot;File:CKEditor XHTML Data Processor.png&amp;quot;:&amp;amp;#32;Reduced the image width.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=File:CKEditor_XHTML_Data_Processor.png&amp;diff=4432</id>
		<title>File:CKEditor XHTML Data Processor.png</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=File:CKEditor_XHTML_Data_Processor.png&amp;diff=4432"/>
				<updated>2010-10-20T15:00:08Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=File:CKEditor_Data_Processor.png&amp;diff=4431</id>
		<title>File:CKEditor Data Processor.png</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=File:CKEditor_Data_Processor.png&amp;diff=4431"/>
				<updated>2010-10-20T14:57:48Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide&amp;diff=4430</id>
		<title>CKEditor 3.x/Developers Guide</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide&amp;diff=4430"/>
				<updated>2010-10-20T14:46:29Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Added Data Processor&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:CKEditor 3.x - Developer's Guide}} &lt;br /&gt;
&lt;br /&gt;
*[[CKEditor 3.x/Developers Guide/Installation|Installation]] &lt;br /&gt;
* Integration&lt;br /&gt;
**[[CKEditor 3.x/Developers Guide/Integration|Integration]] &lt;br /&gt;
** [[CKEditor 3.x/Developers Guide/jQuery Adapter|jQuery]]&lt;br /&gt;
*Configuration &lt;br /&gt;
**[[CKEditor 3.x/Developers Guide/Setting Configurations|Setting Configurations]] &lt;br /&gt;
**[[CKEditor 3.x/Developers Guide/Toolbar|Toolbar]] &lt;br /&gt;
**[[CKEditor_3.x/Developers_Guide/Styles|Styles]] &lt;br /&gt;
**[[CKEditor 3.x/Developers Guide/Output Formatting|Output Formatting]] &lt;br /&gt;
**[[CKEditor 3.x/Developers Guide/Templates|Templates]]&lt;br /&gt;
**Spell Checker &lt;br /&gt;
**[[CKEditor 3.x/Developers Guide/File Browser (Uploader)|File Browser/Uploader ]] &lt;br /&gt;
*Customization &lt;br /&gt;
**[[CKEditor 3.x/Developers Guide/Dialog_Customization|Dialogs]]&lt;br /&gt;
**Plugins &lt;br /&gt;
**Skins &lt;br /&gt;
*Advanced Tasks&lt;br /&gt;
**[[CKEditor_3.x/Developers_Guide/Editor_Core_URLs_Manipulation|Editor Core URLs Manipulation]]&lt;br /&gt;
**[[CKEditor_3.x/Developers_Guide/Data_Processor|Data Processor: Data Input and Output Manipulation]]&lt;br /&gt;
*Deployment &lt;br /&gt;
*[http://docs.cksource.com/ckeditor_api/ JavaScript API] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture|Design and Architecture]]&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/Coding_Patterns&amp;diff=4421</id>
		<title>FCKeditor 3.x/Design and Architecture/Coding Patterns</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/Coding_Patterns&amp;diff=4421"/>
				<updated>2010-09-13T14:44:52Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page lists some interesting coding patterns that we may or may not use in our code.&lt;br /&gt;
&lt;br /&gt;
== Self Executing Functions ==&lt;br /&gt;
&lt;br /&gt;
This is already a classic. Using a self calling function declaration to isolate its contents from the current scope, avoiding polluting it with variables.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(function()&lt;br /&gt;
{ &lt;br /&gt;
	... &lt;br /&gt;
})();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Objects with Private Stuff ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var myObj = function()&lt;br /&gt;
{ &lt;br /&gt;
	// Private variables.&lt;br /&gt;
	var privateVar = 10;&lt;br /&gt;
&lt;br /&gt;
	var privateFunction = function()&lt;br /&gt;
	{ &lt;br /&gt;
        ... &lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	// Public stuff.&lt;br /&gt;
	return { &lt;br /&gt;
      	publicMethod : function()&lt;br /&gt;
		{ &lt;br /&gt;
			// May access privateVar or privateFunction.&lt;br /&gt;
        		... &lt;br /&gt;
		}&lt;br /&gt;
	};&lt;br /&gt;
}();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== For Loops and Length ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;length&amp;quot; property should not be checked on each &amp;quot;for&amp;quot; cycle. The following construction should be used instead: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
for ( var i = 0, len = list.length ; i &amp;lt; len ; i++ } &lt;br /&gt;
{ &lt;br /&gt;
        ... &lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/Coding_Style&amp;diff=4420</id>
		<title>FCKeditor 3.x/Design and Architecture/Coding Style</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/Coding_Style&amp;diff=4420"/>
				<updated>2010-09-13T14:43:11Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Added String Literals&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Coding Style Guidelines =&lt;br /&gt;
&lt;br /&gt;
These guidelines where defined based on mixed common standards mainly related to Java programming. It aims to reflect the generally accepted standards for JavaScript coding with some minor adjustments.&lt;br /&gt;
&lt;br /&gt;
It is quite common to take the Java style to write JavaScript code, assuming it is a &amp;quot;cut-down&amp;quot; version of Java. Although JavaScript has an indirect relation with Java, apart from the similar &amp;quot;C     &lt;br /&gt;
== General Recommendations  ==&lt;br /&gt;
&lt;br /&gt;
Any violation to the guide is allowed if it enhances readability. &lt;br /&gt;
&lt;br /&gt;
If the name &amp;quot;CKEditor&amp;quot; is used, if must always be written with &amp;quot;CKE&amp;quot; uppercased concatenated with &amp;quot;ditor&amp;quot; in lowercase. The following usages are wrong: &amp;quot;CKeditor&amp;quot;, &amp;quot;ckEditor&amp;quot;, &amp;quot;CK Editor&amp;quot;, etc. Exceptions are made for directories and file names, which must always be lowercased, and the CKEDITOR namespace name. &lt;br /&gt;
&lt;br /&gt;
If the name &amp;quot;FCKeditor&amp;quot; is used, it must always be written with &amp;quot;FCK&amp;quot; uppercased concatenated with &amp;quot;editor&amp;quot; in lowercase. The following are wrong: &amp;quot;FckEditor&amp;quot;, &amp;quot;FCKEditor&amp;quot;, &amp;quot;fckEditor&amp;quot;, &amp;quot;FCK Editor&amp;quot;, and so on. Exception is made for directory names, where all chars &amp;quot;should&amp;quot; be in lowercase. &lt;br /&gt;
&lt;br /&gt;
The name &amp;quot;JavaScript&amp;quot; should be written with both the &amp;quot;J&amp;quot; and &amp;quot;S&amp;quot; in uppercase. The following are wrong: &amp;quot;Javascript&amp;quot;, &amp;quot;javascript&amp;quot;, etc.&lt;br /&gt;
&lt;br /&gt;
== Naming Conventions ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Name Conventions  ===&lt;br /&gt;
&lt;br /&gt;
The ROOT namespace has a fixed name: CKEDITOR. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing namespaces must be all lowercase. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR.dom, CKEDITOR.env, CKEDITOR.ui&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing public classes and public global objects must be in PascalCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR.dom.Document, CKEDITOR.Util&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing constants must be all UPPERCASE. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR.STATUS_COMPLETE, CKEDITOR.EDITMODE_WYSIWYG, CKEDITOR.CTRL&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing public methods must be verbs and written in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;appendStyleSheet(), getElement (), setTimeout()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing public properties must be nouns and written in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;name, document, targetWindow&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing private methods must be verbs and written in camelCase prefixed with an underscore. &lt;br /&gt;
&amp;lt;pre&amp;gt;_doInternalStuff()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing private properties must be nouns and written in camelCase prefixed with an underscore. &lt;br /&gt;
&amp;lt;pre&amp;gt;_internalCounter, _prefix&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Abbreviations and acronyms should not be uppercase when used as name. &lt;br /&gt;
&amp;lt;pre&amp;gt;setHtml(), XmlDocument&lt;br /&gt;
NOT&lt;br /&gt;
setHTML(), XMLDocument&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
All names should be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Specific Name Conventions ===&lt;br /&gt;
&lt;br /&gt;
The prefixes &amp;quot;get&amp;quot; and &amp;quot;set&amp;quot; may be used on methods that get or set properties which require computation.&lt;br /&gt;
&amp;lt;pre&amp;gt;setArrayCount(), getFormattedValue()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The prefix &amp;quot;checkIs&amp;quot; may be used on methods which return boolean states which require computation.&lt;br /&gt;
&amp;lt;pre&amp;gt;checkIsValid(), checkIsEmpty()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Abbreviations in names should be avoided.&lt;br /&gt;
&amp;lt;pre&amp;gt;getDirectoryName(), applicationCommand&lt;br /&gt;
NOT&lt;br /&gt;
getDirName(), appCmd&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Files ==&lt;br /&gt;
&lt;br /&gt;
All files must be named in all lower case.&lt;br /&gt;
&lt;br /&gt;
Classes and global objects should be declared in individual files with the file name matching the class/object name.&lt;br /&gt;
&amp;lt;pre&amp;gt;fckbrowserinfo.js, fcktoolbarbutton.js&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Layout  ==&lt;br /&gt;
&lt;br /&gt;
For indentation, the TAB should be used. Development IDEs should be configured to represent TABs as 4 spaces. &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( test )&lt;br /&gt;
{&lt;br /&gt;
    if ( otherTest )&lt;br /&gt;
        doSomething();&lt;br /&gt;
    doMore();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Block layout should be as illustrated. &lt;br /&gt;
&amp;lt;pre&amp;gt;while (&amp;amp;nbsp;!done )&lt;br /&gt;
{&lt;br /&gt;
    doSomething();&lt;br /&gt;
    done = moreToDo();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Single statement (single line only) if/else/while/for could (preferably) be written without brackets, but never in the same line. &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( condition )&lt;br /&gt;
    statement;&lt;br /&gt;
&lt;br /&gt;
while ( condition )&lt;br /&gt;
    statement;&lt;br /&gt;
&lt;br /&gt;
for ( initialization&amp;amp;nbsp;; condition&amp;amp;nbsp;; update )&lt;br /&gt;
    statement;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above rule is not valid for nested blocks, like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;if ( condition )&lt;br /&gt;
{&lt;br /&gt;
    if ( anotherCondition )&lt;br /&gt;
        statement;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// WRONG:&lt;br /&gt;
if ( condition )&lt;br /&gt;
    if ( anotherCondition )&lt;br /&gt;
        statement;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The incompleteness of split lines must be made obvious. &lt;br /&gt;
&amp;lt;pre&amp;gt;totalSum = a + b + c + &lt;br /&gt;
    d + e; &lt;br /&gt;
&lt;br /&gt;
method( param1, param2,&lt;br /&gt;
    param3 ); &lt;br /&gt;
&lt;br /&gt;
setText( 'Long line split' + &lt;br /&gt;
    'into two parts.' );&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Whitespace  ===&lt;br /&gt;
&amp;quot;If&amp;quot;, &amp;quot;for&amp;quot;, &amp;quot;while&amp;quot; and &amp;quot;switch&amp;quot; should be followed by a white space.&lt;br /&gt;
&amp;lt;pre&amp;gt;if ( true )&lt;br /&gt;
NOT&lt;br /&gt;
if( true )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Conventional operators should be surrounded by a space (including ternary operators). &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( i &amp;amp;gt; 3 &amp;amp;amp;&amp;amp;amp; test == 'yes' )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Commas should be followed by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;function myFunction( parm1, param2, param3 )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Semi-colons in for statements should be surrounded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;for ( var i = 0&amp;amp;nbsp;; i &amp;amp;lt; count&amp;amp;nbsp;; i++ )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Semi-colons should not be preceded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;doSomething();&lt;br /&gt;
var name = 'John';&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Colons should be surrounded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;case 100&amp;amp;nbsp;:&lt;br /&gt;
NOT&lt;br /&gt;
case 100:&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Opening parenthesis must be followed by a space and closing parenthesis must be preceded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( myVar == 1 )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
There special cases where no space is recommended. When opening parenthesis for a &amp;quot;self-executing anonymous function&amp;quot; and when closing parenthesis after an indented code block:&lt;br /&gt;
&amp;lt;pre&amp;gt;(function()&lt;br /&gt;
{&lt;br /&gt;
    // Code here&lt;br /&gt;
})();&lt;br /&gt;
&lt;br /&gt;
myMethod( function()&lt;br /&gt;
    {&lt;br /&gt;
        // Code here&lt;br /&gt;
    });&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Functions/method calls should not be followed by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;doSomething( someParameter );&lt;br /&gt;
NOT&lt;br /&gt;
doSomething ( someParameter );&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Logical units within a block should be separated by one blank line. &lt;br /&gt;
&amp;lt;pre&amp;gt;// Create a new identity matrix&lt;br /&gt;
var matrix = new Matrix4x4();&lt;br /&gt;
&lt;br /&gt;
// Precompute angles for efficiency &lt;br /&gt;
var cosAngle = mathCos( angle );&lt;br /&gt;
var sinAngle = mathSin( angle );&lt;br /&gt;
&lt;br /&gt;
// Specify matrix as a rotation transformation &lt;br /&gt;
matrix.setElement( 1, 1, cosAngle );&lt;br /&gt;
matrix.setElement( 1, 2, sinAngle ); &lt;br /&gt;
matrix.setElement( 2, 1, -sinAngle );&lt;br /&gt;
matrix.setElement( 2, 2, cosAngle );&lt;br /&gt;
&lt;br /&gt;
// Apply rotation&lt;br /&gt;
transformation.multiply( matrix );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Multiple variables declaration in a single &amp;quot;var&amp;quot; statement must be aligned with a single tab.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var example = 1,&lt;br /&gt;
    sample = 2;&lt;br /&gt;
NOT&lt;br /&gt;
var example = 1,&lt;br /&gt;
        sample = 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variables  ==&lt;br /&gt;
&lt;br /&gt;
Variables must be always defined with &amp;quot;var&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Function parameters must be in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;function sum( firstNumber, secondNumber )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Local variables must be in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;function doSomething()&lt;br /&gt;
{&lt;br /&gt;
    var colorOne = 1;&lt;br /&gt;
    var colorTwo = 2;&lt;br /&gt;
&lt;br /&gt;
    return colorOne + colorTwo;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Several variables can be defined with a single var statement, but only if their initialization values are in single lines. Do not initialize more than one variable is a single line: &lt;br /&gt;
&amp;lt;pre&amp;gt;var aVar, someVar,&lt;br /&gt;
    other1Var = 10,&lt;br /&gt;
    other2Var = 25,&lt;br /&gt;
    isVar = true;&lt;br /&gt;
&lt;br /&gt;
var longVar = function()&lt;br /&gt;
{&lt;br /&gt;
    // This var takes more than one line.&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
var objVar =&lt;br /&gt;
{&lt;br /&gt;
    // This var takes more than one line.&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Comments  ==&lt;br /&gt;
&lt;br /&gt;
Tricky code should not be commented but rewritten: In general, the use of comments should be minimized by making the code self-documenting by appropriate name choices and an explicit logical structure. &lt;br /&gt;
&lt;br /&gt;
All comments should be written in English. Whenever possible, end comments with a period as normal phrases, and wrap comments within the first 80 characters of each line. &lt;br /&gt;
&lt;br /&gt;
There should be a space after the comment identifier. &lt;br /&gt;
&amp;lt;pre&amp;gt;// This is a comment.   NOT: //This is a comment &lt;br /&gt;
/**                     NOT: /** &lt;br /&gt;
* This is block               *This is a block &lt;br /&gt;
* comment.                    *comment &lt;br /&gt;
*/                            */&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that comment blocks should be opened with two asterisks only for documentation purposes. See [[FCKeditor 3.x/Design and Architecture/Documentation#JavaScript_API|JavaScript API Documentation]].&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions ==&lt;br /&gt;
&lt;br /&gt;
The '''regular expression literal''' should be used whenever possible, instead of the RegExp object, which should be used only when the regular expression pattern is not constant or depends on runtime computation.&lt;br /&gt;
&amp;lt;pre&amp;gt;/^foo\s*/i&lt;br /&gt;
NOT&lt;br /&gt;
new RegExp( '^foo\s*', 'i' )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Other than shortnesses and better readability, regular expression literals are compiled during script evaluation, which improves performance at runtime.&lt;br /&gt;
&lt;br /&gt;
== String Literals ==&lt;br /&gt;
&lt;br /&gt;
When defining string literals, use single quotes instead of double quotes, whenever possible.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;var s = 'Some text';&lt;br /&gt;
NOT&lt;br /&gt;
var s = &amp;quot;Some text&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== File Headers  ==&lt;br /&gt;
&lt;br /&gt;
There are minimum requirements for us to be able to make our code available to the world. Most of them are related to legal needs, which help us protecting the project from abuses. &lt;br /&gt;
&lt;br /&gt;
Here is a JavaScript template for the header to be included in the source code: &lt;br /&gt;
&amp;lt;pre&amp;gt;/*&lt;br /&gt;
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.&lt;br /&gt;
For licensing, see LICENSE.html or http://ckeditor.com/license&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Of course, different languages have different commenting syntax, so it is enough to copy the header from an existing file to maintain the style. &lt;br /&gt;
&lt;br /&gt;
=== Author Tags  ===&lt;br /&gt;
&lt;br /&gt;
Author names, e-mails or web site addresses should be avoided in the header. To justify that, let me recall a citation from Sander Striker, a member of the Apache Software Foundation, that can be found at [http://producingoss.com/en/managing-volunteers.html#territoriality Producing Open Source Software]: &lt;br /&gt;
&amp;lt;blockquote&amp;gt;At the Apache Software foundation we discourage the use of author tags in source code. There are various reasons for this, apart from the legal ramifications. Collaborative development is about working on projects as a group and caring for the project as a group. Giving credit is good, and should be done, but in a way that does not allow for false attribution, even by implication. There is no clear line for when to add or remove an author tag. Do you add your name when you change a comment? When you put in a one-line fix? Do you remove other author tags when you refactor the code and it looks 95% different? What do you do about people who go about touching every file, changing just enough to make the virtual author tag quota, so that their name will be everywhere?&amp;lt;br&amp;gt; &amp;lt;/blockquote&amp;gt; &amp;lt;blockquote&amp;gt;&lt;br /&gt;
There are better ways to give credit, and our preference is to use those. From a technical standpoint author tags are unnecessary; if you wish to find out who wrote a particular piece of code, the version control system can be consulted to figure that out. Author tags also tend to get out of date. Do you really wish to be contacted in private about a piece of code you wrote five years ago and were glad to have forgotten?&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;/blockquote&amp;gt; &lt;br /&gt;
The SVN is a good place to understand user participation. Even when committing changes proposed by Joe White, it is nice to add a comment like &amp;quot;Thanks to Joe White.&amp;quot; in the commit message.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=Talk:CKEditor_3.x/&amp;diff=3735</id>
		<title>Talk:CKEditor 3.x/</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=Talk:CKEditor_3.x/&amp;diff=3735"/>
				<updated>2010-07-09T08:28:42Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Any hope of making editable stub pages for some of the topics in this table of contents?  That way, people with validated accounts would be able to help edit them.  --[[User:Akjohnson|Akjohnson]] 03:02, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
- We've tried it in the past, with bad results: vandalism, low quality, anarchy, etc. So for now, contributions can be placed in the talk pages directly. --[[User:Fredck|FredCK]] 08:28, 9 July 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=Talk:CKEditor_3.x/&amp;diff=3734</id>
		<title>Talk:CKEditor 3.x/</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=Talk:CKEditor_3.x/&amp;diff=3734"/>
				<updated>2010-07-09T08:28:19Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Any hope of making editable stub pages for some of the topics in this table of contents?  That way, people with validated accounts would be able to help edit them.  --[[User:Akjohnson|Akjohnson]] 03:02, 4 July 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
- We've tried it in the past, with bad results: vandalism, low quality, anarchy, etc. So for now, contributions can be placed in the talk pages directly.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=Talk:FCKeditor_3.x/Design_and_Architecture/Dialog_System&amp;diff=3725</id>
		<title>Talk:FCKeditor 3.x/Design and Architecture/Dialog System</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=Talk:FCKeditor_3.x/Design_and_Architecture/Dialog_System&amp;diff=3725"/>
				<updated>2010-06-03T10:00:27Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/Dialog_System&amp;diff=3724</id>
		<title>FCKeditor 3.x/Design and Architecture/Dialog System</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/Dialog_System&amp;diff=3724"/>
				<updated>2010-06-03T09:59:37Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: /* Dialog Definition */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The new dialog system in CKEditor is to be written from scratch. One of the key things in CKEditor is that it doesn't rely on HTML pages to run. Everything is created on the fly in JavaScript. In this way, we avoid limitations about cross domain serving of the editor code, like CDN solutions, and enhance the editor performance. &lt;br /&gt;
&lt;br /&gt;
== Framework  ==&lt;br /&gt;
&lt;br /&gt;
Dialogs will be controlled by the Dialog System Framework. This system offer features to define, modify and use dialogs within the editor. It brings uniform design among the dialogs, as well as advanced features with easy. &lt;br /&gt;
&lt;br /&gt;
== Dialog Manager  ==&lt;br /&gt;
&lt;br /&gt;
The Dialog Manager is the core of the dialog system. It introduces API features to open and manage dialogs in the editor. It also creates the basic structure of the dialog, the dialog framework, and loads the dialog contents. It manages dialog contents validation and provides the features to be used by the dialog definition object. &lt;br /&gt;
&lt;br /&gt;
== Main API  ==&lt;br /&gt;
&lt;br /&gt;
The dialog system runs under the CKEDITOR.dialog namespace. Its code is to be defined in the &amp;quot;dialog&amp;quot; plugin. &lt;br /&gt;
&lt;br /&gt;
The dialog plugin extends the CKEDITOR.editor class, by adding the &amp;quot;'''CKEDITOR.editor.openDialog'''&amp;quot; function. This function is relative to the editor instance, because dialogs are sensitive to its configurations, as well as to its contents and selection state. &lt;br /&gt;
&lt;br /&gt;
== Structure  ==&lt;br /&gt;
&lt;br /&gt;
In a macro structure definition, a dialog is composed by the following pieces: &lt;br /&gt;
&lt;br /&gt;
*'''Cover''': a semi transparent element which is placed over the entire page to give the user a &amp;quot;modal dialog&amp;quot; effect. The user is required to close the dialog to access the page again.&lt;br /&gt;
&lt;br /&gt;
*'''Main Dialog Structure''': a floating element that holds the dialog structure. This structure defines several elements that are common to all dialogs:&amp;lt;br&amp;gt;&lt;br /&gt;
**'''Title''': a title space for the dialog.&lt;br /&gt;
**'''Close button''': an element that closes the dialog on click. &lt;br /&gt;
**'''Buttons space''': a space reserved to the main dialog buttons, like the &amp;quot;OK&amp;quot; and &amp;quot;Cancel&amp;quot; buttons. &lt;br /&gt;
**'''Resize handle''': the element to be used to resize the dialog, if resizable. &lt;br /&gt;
**'''Contents''': the space where the dialog contents are to be rendered. &lt;br /&gt;
**'''Tabs Space''': the space where dialog tabs are to be rendered. Each tab fills the Contents space with different contents.&lt;br /&gt;
&lt;br /&gt;
The following is a sample graphical representation of this structure: &lt;br /&gt;
&amp;lt;pre&amp;gt;+---------------------------------------+&lt;br /&gt;
| (Cover)                               |&lt;br /&gt;
|     +---------------------------+     |&lt;br /&gt;
|     | (Title)               (x) |     |&lt;br /&gt;
|     |---------------------------|     |&lt;br /&gt;
|     | (Tabs)                    |     |&lt;br /&gt;
|     |---------------------------|     |&lt;br /&gt;
|     | (Contents)                |     |&lt;br /&gt;
|     |                           |     |&lt;br /&gt;
|     |                           |     |&lt;br /&gt;
|     |                           |     |&lt;br /&gt;
|     |                           |     |&lt;br /&gt;
|     |                           |     |&lt;br /&gt;
|     |                           |     |&lt;br /&gt;
|     |---------------------------|     |&lt;br /&gt;
|     |              (Buttons) (/)|     |&lt;br /&gt;
|     +---------------------------+     |&lt;br /&gt;
|                                       |&lt;br /&gt;
+---------------------------------------+&lt;br /&gt;
&lt;br /&gt;
(x) = Close button&lt;br /&gt;
(/) = Resize handle&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The main dialog structure is defined by the editor theme, by its &amp;quot;buildDialog&amp;quot; function. This function returns the HTML for the main dialog structure, as well as the information needed by the dialog system to render it properly and fill its &amp;quot;placeholders&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
== Dialog Definition  ==&lt;br /&gt;
&lt;br /&gt;
When opening a dialog, the &amp;quot;Dialog Definition&amp;quot; is to be passed to the dialog system. This definition must be first &amp;quot;registered&amp;quot;, to be then called later. The following function can be used to register it: &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR.dialog.add( 'dialog name', function( editor )&lt;br /&gt;
	{&lt;br /&gt;
		return { ... definition ... };&lt;br /&gt;
	});&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
CKEDITOR.dialog.add( 'dialog name', 'definition file path.js' );&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that the definition can either be passed to the dialog system directly, or even be found in a separated JavaScript file. The dialog system will then use a callback system to download the file and load the definition. The definition file should have the add() function call to register the dialog again, just like the first of the above examples. The definitions are then cached and reused by all editor instances. &lt;br /&gt;
&lt;br /&gt;
The definition is a function that receives an editor instance. This function is called every time a dialog is to be displayed. It then returns the definition object, which may be customized for that specific instance. The following is a compact representation of this object: &lt;br /&gt;
&amp;lt;pre&amp;gt;{&lt;br /&gt;
	title: 'Dialog Title',&lt;br /&gt;
&lt;br /&gt;
	resizable: CKEDITOR.DIALOG_RESIZE_NONE,&lt;br /&gt;
&lt;br /&gt;
	minWidth: {number},&lt;br /&gt;
&lt;br /&gt;
	minHeight: {number},&lt;br /&gt;
&lt;br /&gt;
	buttons: [ ... ],&lt;br /&gt;
&lt;br /&gt;
	contents: [ ... ],&lt;br /&gt;
&lt;br /&gt;
	onOk: function() { ... },&lt;br /&gt;
&lt;br /&gt;
	onCancel: function() { ... },&lt;br /&gt;
&lt;br /&gt;
	onLoad: function( data ) { ... }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Only the &amp;quot;title&amp;quot; and &amp;quot;contents&amp;quot; properties are required. Other properties have their default values. &lt;br /&gt;
&lt;br /&gt;
Plugins or user code may at any time change the dialog definition, adding or removing things from it. It is enough to listen for the &amp;quot;dialogDefinition&amp;quot; event in the CKEDITOR object. The definition can also be retrieved at any time after it with the CKEDITOR.dialog.get function. &lt;br /&gt;
&lt;br /&gt;
Dialogs are not resizable by default. If any of the resize constants are defined (CKEDITOR.DIALOG_RESIZE_HEIGHT | CKEDITOR.DIALOG_RESIZE_WIDHT | CKEDITOR.DIALOG_RESIZE_BOTH), the resize handle will be displayed. The size of the &amp;quot;contents&amp;quot; placeholder is changed when resizing, and the minWidth and minHeight properties are respected. &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;onOk&amp;quot; and &amp;quot;onCancel&amp;quot; are properties that can be set to functions to be called when one of the standard buttons is clicked. If the function explicitly returns &amp;quot;false&amp;quot;, the dialog don't get closed. &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;onLoad&amp;quot; function is called when the dialog is loaded. An empty &amp;quot;data&amp;quot; object is passed to it. This object may get filled by the function with data to be reused by the dialog elements. &lt;br /&gt;
&lt;br /&gt;
=== Buttons Definition  ===&lt;br /&gt;
&lt;br /&gt;
By default, the &amp;quot;Cancel&amp;quot; button is available on dialogs. The definition can instead contain a list of buttons to be displayed. The following is an example of the buttons property definition: &lt;br /&gt;
&amp;lt;pre&amp;gt;buttons: [&lt;br /&gt;
	CKEDITOR.dialog.okButton,&lt;br /&gt;
&lt;br /&gt;
	CKEDITOR.dialog.cancelButton,&lt;br /&gt;
&lt;br /&gt;
	{&lt;br /&gt;
		id: 'unique name',&lt;br /&gt;
                type: 'button',&lt;br /&gt;
		label: 'Custom Button',&lt;br /&gt;
		title: 'Button description',&lt;br /&gt;
		accessKey: 'C',&lt;br /&gt;
		disabled: false,&lt;br /&gt;
		onClick: function()&lt;br /&gt;
			{&lt;br /&gt;
				// code on click&lt;br /&gt;
			},&lt;br /&gt;
	}&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that special objects are available for the &amp;quot;Ok&amp;quot; and &amp;quot;Cancel&amp;quot; buttons. Those objects are actually functions, which accept an object that overrides their default properties. For example, if you want the &amp;quot;Ok&amp;quot; button to be labeled &amp;quot;Go&amp;quot;, just do this: &lt;br /&gt;
&amp;lt;pre&amp;gt;buttons: [&lt;br /&gt;
	CKEDITOR.dialog.okButton( {&lt;br /&gt;
			label: 'Go'&lt;br /&gt;
		}),&lt;br /&gt;
&lt;br /&gt;
	CKEDITOR.dialog.cancelButton&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The &amp;quot;id&amp;quot; property can be defined on custom buttons. It makes it possible to retrieve a specific button at runtime to execute special functions on it, like enabling/disabling it, or even triggering its click. &lt;br /&gt;
&lt;br /&gt;
We encourage defining an access key for each custom button. It should be a keyboard keystroke, which will be then combined with the CTRL key. The Ok and Cancel buttons can be fired with the ENTER and ESC key, respectively. &lt;br /&gt;
&lt;br /&gt;
=== Contents Definition  ===&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;contents&amp;quot; property is the most important in the definition. It defines the actual dialog contents. Note that this property is an array. Each entry in this array is an object. Each object will be represented by a &amp;quot;tab&amp;quot; in the dialog. No tabs are shown if just one object is defined. &lt;br /&gt;
&lt;br /&gt;
The following is the compact representation of a single contents object: &lt;br /&gt;
&amp;lt;pre&amp;gt;{&lt;br /&gt;
	id: 'unique name',&lt;br /&gt;
	label: 'Tab Label',&lt;br /&gt;
	title: 'Contents description',&lt;br /&gt;
	accessKey: 'Q',&lt;br /&gt;
	elements&amp;amp;nbsp;: [ ... ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Just like the buttons, here again we have id, label, title and access key to be defined for each content object. It is possible to activate one of the tabs by using the CTRL + access key. It is also possible to switching between the tabs by hitting CTRL+SPACE (forward) and CTRL+SHIFT+SPACE (backward). &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;elements&amp;quot; array contains the UI element definitions for this contents object. Details can be found in the next section.&lt;br /&gt;
&lt;br /&gt;
== UI Elements  ==&lt;br /&gt;
&lt;br /&gt;
The inner part of the dialog is finally filled with &amp;quot;UI elements&amp;quot;. For example, the following is a possible definition for a simple text field: &lt;br /&gt;
&amp;lt;pre&amp;gt;{&lt;br /&gt;
	id: 'width',&lt;br /&gt;
	type: 'text',&lt;br /&gt;
	label: editor.lang.width,&lt;br /&gt;
	title: editor.lang.widthTitle,&lt;br /&gt;
	default: '120',&lt;br /&gt;
	className: 'anyClass',&lt;br /&gt;
	style: 'someStyles',&lt;br /&gt;
	onLoad: function( data ) { ... }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Most of the properties are optional, including &amp;quot;id&amp;quot; property, but it is recommended as it makes it easier to customize the dialog. &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;type&amp;quot; property is required. It indicates which &amp;quot;UI element builder&amp;quot; to use for this element. The dialog core code provides only two element types, &amp;quot;vbox&amp;quot; and &amp;quot;hbox&amp;quot;, which are containers for other elements: &lt;br /&gt;
&amp;lt;pre&amp;gt;{&lt;br /&gt;
	type: 'vbox|hbox', &lt;br /&gt;
	children: [ ... ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The &amp;quot;vbox&amp;quot; element will dispose all children elements vertically, one bellow the other. The &amp;quot;hbox&amp;quot; element will place then one next to the other horizontally instead. &lt;br /&gt;
&lt;br /&gt;
The main contents placeholder itself is rendered by a vbox element object. &lt;br /&gt;
&lt;br /&gt;
=== Defining Elements  ===&lt;br /&gt;
&lt;br /&gt;
Plugins or inline code can easily define new dialog UI elements to be used inside the dialogs. For that, &amp;quot;UI element builders&amp;quot; must be registered with the following call: &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR.dialog.addUIElement( 'type name', &lt;br /&gt;
	{	&lt;br /&gt;
		build&amp;amp;nbsp;: function( elementDefinition, output )&lt;br /&gt;
		{&lt;br /&gt;
			// render the element to the output (Array) &lt;br /&gt;
&lt;br /&gt;
			return {&lt;br /&gt;
				setValue&amp;amp;nbsp;: function( value, resetChanged )&lt;br /&gt;
				{&lt;br /&gt;
					// set the element value, based on the elementBag&lt;br /&gt;
					// information.&lt;br /&gt;
				},&lt;br /&gt;
&lt;br /&gt;
				getValue&amp;amp;nbsp;: function()&lt;br /&gt;
				{&lt;br /&gt;
					// returns the current value.&lt;br /&gt;
				},&lt;br /&gt;
&lt;br /&gt;
				isChanged&amp;amp;nbsp;: function()&lt;br /&gt;
				{&lt;br /&gt;
					// returns a Boolean indicating that the value&lt;br /&gt;
					// has been changed.&lt;br /&gt;
				},&lt;br /&gt;
&lt;br /&gt;
				focus&amp;amp;nbsp;: function()&lt;br /&gt;
				{&lt;br /&gt;
				}&lt;br /&gt;
			};&lt;br /&gt;
		}&lt;br /&gt;
	});&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The elementDefinition parameter is the exact element object taken from the dialog definition. If the element handles children elements, it is also responsible for calling the build function for those elements. &lt;br /&gt;
&lt;br /&gt;
The build function returns an object, which will be used to handle this element at runtime. &lt;br /&gt;
&lt;br /&gt;
=== Elements Plugin  ===&lt;br /&gt;
&lt;br /&gt;
The editor comes with the &amp;quot;dialogui&amp;quot; plugin, which defines the most common dialog UI elements types: &lt;br /&gt;
&amp;lt;pre&amp;gt;{&lt;br /&gt;
	type&amp;amp;nbsp;: 'text',&lt;br /&gt;
	label&amp;amp;nbsp;: 'Label Text',&lt;br /&gt;
	title&amp;amp;nbsp;: 'Field description',&lt;br /&gt;
	default&amp;amp;nbsp;: '...',&lt;br /&gt;
	className: '...',&lt;br /&gt;
	style: '...',&lt;br /&gt;
	required: true/false,&lt;br /&gt;
	validate: function() { ... }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
	type&amp;amp;nbsp;: 'select',&lt;br /&gt;
	label&amp;amp;nbsp;: 'Label Text',&lt;br /&gt;
	title&amp;amp;nbsp;: 'Field description',&lt;br /&gt;
	default&amp;amp;nbsp;: '...',&lt;br /&gt;
	className: '...',&lt;br /&gt;
	style: '...',&lt;br /&gt;
	required: true/false,&lt;br /&gt;
	validate: function() { ... }&lt;br /&gt;
	items:&lt;br /&gt;
	[&lt;br /&gt;
		[ 'Label 1', 'Value' ],&lt;br /&gt;
		[ 'Label 2' ]  // Value is 'Label 2'&lt;br /&gt;
	]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
	type&amp;amp;nbsp;: 'radio',&lt;br /&gt;
	label&amp;amp;nbsp;: 'Label Text',&lt;br /&gt;
	title&amp;amp;nbsp;: 'Field description',&lt;br /&gt;
	default&amp;amp;nbsp;: '...',&lt;br /&gt;
	className: '...',&lt;br /&gt;
	style: '...',&lt;br /&gt;
	required: true/false,&lt;br /&gt;
	validate: function() { ... },&lt;br /&gt;
	items:&lt;br /&gt;
	[&lt;br /&gt;
		[ 'Label 1', 'Value', 'Title' ],&lt;br /&gt;
		[ 'Label 2' ]  // Value and Title are 'Label 2'&lt;br /&gt;
	]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
	type&amp;amp;nbsp;: 'checkbox',&lt;br /&gt;
	label&amp;amp;nbsp;: 'Label Text',&lt;br /&gt;
	title&amp;amp;nbsp;: 'Field description',&lt;br /&gt;
	checked&amp;amp;nbsp;: true|false,&lt;br /&gt;
	className: '...',&lt;br /&gt;
	style: '...',&lt;br /&gt;
	required: true/false,&lt;br /&gt;
	validate: function() { ... }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
	type&amp;amp;nbsp;: 'button',&lt;br /&gt;
	label&amp;amp;nbsp;: 'Label Text',&lt;br /&gt;
	title&amp;amp;nbsp;: 'Field description',&lt;br /&gt;
	className: '...',&lt;br /&gt;
	style: '...',&lt;br /&gt;
	onClick&amp;amp;nbsp;: function(){ ... }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
	type&amp;amp;nbsp;: 'html',&lt;br /&gt;
	className: '...',&lt;br /&gt;
	style: '...',&lt;br /&gt;
	html: 'Some &amp;amp;lt;b&amp;amp;gt;HTML&amp;amp;lt;/b&amp;amp;gt;'&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Workflow  ==&lt;br /&gt;
&lt;br /&gt;
When loading the dialog: &lt;br /&gt;
&lt;br /&gt;
*editor.openDialog( 'dialogName' ) is called. &lt;br /&gt;
*The dialog system shows the cover (hourglass icon). &lt;br /&gt;
*The dialog definition for 'dialogName' is loaded. &lt;br /&gt;
*If needed, the dialog definition is downloaded. &lt;br /&gt;
*editor.theme.buildDialog() is called returning the main structure HTML &lt;br /&gt;
*The main structure HTML is injected into the DOM (hidden). &lt;br /&gt;
*Based on the dialog definition, the dialog system fills the dialog title, enables the resize handler and creates the dialog buttons. &lt;br /&gt;
*The &amp;quot;onLoad&amp;quot; function is called for the dialog definition. &lt;br /&gt;
*Tabs are created for the content objects. &lt;br /&gt;
*The &amp;quot;onLoad&amp;quot; is called for each UI elements defined (recursively on children elements also). &lt;br /&gt;
*All elements in the content object to be displayed are rendered. &lt;br /&gt;
*The resulting rendered HTML is injected into the DOM. &lt;br /&gt;
*The dialog is displayed (normal icon).&lt;br /&gt;
&lt;br /&gt;
When hitting Ok: &lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;validate&amp;quot; function is called for each element. If any of them is invalid, the focus is moved to it, and a standard UI alert is displayed. &lt;br /&gt;
*The &amp;quot;onOk&amp;quot; function is called. &lt;br /&gt;
*If &amp;quot;onOk&amp;quot; doesn't return &amp;quot;false&amp;quot;, the dialog gets destroyed.&lt;br /&gt;
&lt;br /&gt;
When hitting Cancel: &lt;br /&gt;
&lt;br /&gt;
*The &amp;quot;isChanged&amp;quot; function is called for each element. If any of then has been changed, a standard warning message is displayed (&amp;quot;Are you sure blah blah...?&amp;quot;). &lt;br /&gt;
*The &amp;quot;onCancel&amp;quot; function is called. &lt;br /&gt;
*If &amp;quot;onCancel&amp;quot; doesn't return &amp;quot;false&amp;quot;, the dialog gets destroyed.&lt;br /&gt;
&lt;br /&gt;
== Dialog Definition API Extensions  ==&lt;br /&gt;
&lt;br /&gt;
Once registered, a dialog definition gets &amp;quot;extended&amp;quot; by the dialog system. A few API functions are added to it, making it possible to manipulate it: &lt;br /&gt;
&lt;br /&gt;
*getContents( 'id' ): gets a specific contents object, by id. &lt;br /&gt;
*getButton( 'id' ): gets a specific button object, by id. &lt;br /&gt;
*addContents( { ... contents object } [, nextSiblingId] ): adds a content object to the definitions. If the second parameter is specify, the added object is placed before the object with that id, otherwise it is appended to the end. &lt;br /&gt;
*addButton( { ... button object } [,nextSiblingId] ): the same exact behavior of addContents, but for the buttons. &lt;br /&gt;
*removeContents( 'id' ): removes one of the contents objects. &lt;br /&gt;
*removeButton( 'id' ): removes one of the buttons.&lt;br /&gt;
&lt;br /&gt;
Contents objects are extended with the following functions: &lt;br /&gt;
&lt;br /&gt;
*get( 'id' ): gets one of the UI elements by id. &lt;br /&gt;
*add( { ... element definition } [,nextSiblingId] ): just like addContents, it adds UI elements to the list. &lt;br /&gt;
*remove( 'id' ): removes one of the UI elements.&lt;br /&gt;
&lt;br /&gt;
Button object are extended with the following functions: &lt;br /&gt;
&lt;br /&gt;
*enable(): enables the button. &lt;br /&gt;
*disable(): disables the button.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKFinder_1.x/Developers_Guide/ASP/Configuration/Quick_Start&amp;diff=2855</id>
		<title>CKFinder 1.x/Developers Guide/ASP/Configuration/Quick Start</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKFinder_1.x/Developers_Guide/ASP/Configuration/Quick_Start&amp;diff=2855"/>
				<updated>2010-03-17T09:34:39Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Fixed typo.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The CheckAuthentication function&amp;lt;br&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
By default, CKFinder will not work due to authentication restrictions. You must first be sure that you have configured it properly, and then enable it.&lt;br /&gt;
&lt;br /&gt;
Once you have completely configured CKFinder, you are ready to enable it for use. The CheckAuthentication() function is used for that. In this function, you must implement the code that ensures that the requests are coming from an authenticated user. This is usually done by assigning a session variable when the user logs on your system.&lt;br /&gt;
&lt;br /&gt;
Return &amp;quot;true&amp;quot; if the user is properly authenticated. We strongly recommend you to NOT simply return &amp;quot;true&amp;quot; from this function without implementing authentication checks. Anonymous users would be able to use CKFinder, including uploading and deleting files from your server.&lt;br /&gt;
&lt;br /&gt;
The following is a sample implementation for it:&lt;br /&gt;
&amp;lt;pre&amp;gt;function CheckAuthentication()&lt;br /&gt;
    CheckAuthentication = ( Session( &amp;quot;IsAuthorized&amp;quot; ) )&lt;br /&gt;
End function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== License ===&lt;br /&gt;
&lt;br /&gt;
If you purchased CKFinder you should put your license key in the config.php file:&lt;br /&gt;
&amp;lt;pre&amp;gt;CKFinder_Config.Add &amp;quot;LicenseName&amp;quot;, &amp;quot;&amp;quot;&lt;br /&gt;
CKFinder_Config.Add &amp;quot;LicenseKey&amp;quot;, &amp;quot;&amp;quot;&amp;lt;/pre&amp;gt; &lt;br /&gt;
If you leave this fields blank CKFinder will be fully functional but it will be running in demo mode.&lt;br /&gt;
&lt;br /&gt;
=== baseUrl ===&lt;br /&gt;
&lt;br /&gt;
The '''baseUrl''' is the base path used to build the final URL for the resources handled in CKFinder. Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;baseUrl = &amp;quot;http://example.com/ckfinder/files/&amp;quot;&lt;br /&gt;
baseUrl = &amp;quot;/userfiles/&amp;quot;&amp;lt;/pre&amp;gt; &lt;br /&gt;
If you leave this field empty the default value (/userfiles/) will be used. Notice that the trailing slash is required.&lt;br /&gt;
&lt;br /&gt;
=== baseDir ===&lt;br /&gt;
&lt;br /&gt;
The '''baseDir''' is the path to the local directory (in the server) which points to the above baseUrl URL. This is the path used by CKFinder to handle the files in the server. Full write permissions must be granted to this directory. Examples:&lt;br /&gt;
&lt;br /&gt;
You may point it to a directory directly:&lt;br /&gt;
&amp;lt;pre&amp;gt;baseDir = &amp;quot;/home/login/public_html/ckfinder/files/&amp;quot;&lt;br /&gt;
baseDir = &amp;quot;C:\SiteDir\CKFinder\userfiles\&amp;quot;&amp;lt;/pre&amp;gt; &lt;br /&gt;
Or you may let CKFinder discover the path, based on baseUrl:&lt;br /&gt;
&amp;lt;pre&amp;gt;baseDir = server.MapPath(baseUrl) &amp;amp; &amp;quot;\&amp;quot;&amp;lt;/pre&amp;gt; &lt;br /&gt;
Remember that CKFinder will only discover the path when the base url is a local web path ( relative to document root ).&amp;lt;br&amp;gt;Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;baseUrl = &amp;quot;/userfiles/&amp;quot;&amp;lt;/pre&amp;gt; &lt;br /&gt;
If it is a full URL address.&amp;lt;br&amp;gt;Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;baseUrl = &amp;quot;http://example.com/ckfinder/files/&amp;quot;&amp;lt;/pre&amp;gt; &lt;br /&gt;
the path won't be discovered. Notice that the trailing slash is required.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/ARIA_Described&amp;diff=2849</id>
		<title>FCKeditor 3.x/Design and Architecture/ARIA Described</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/ARIA_Described&amp;diff=2849"/>
				<updated>2010-02-19T12:15:03Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: /* Dialogs */  Updated recent changes to the tabs structure&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides technical information about the ARIA support provided in CKEditor (starting at version 3.2.).&lt;br /&gt;
&lt;br /&gt;
CKEditor 3.2 is fully &amp;quot;ARIA aware&amp;quot;. In fact all the accessibility support preset in the editor core has been switched to ARIA, without considering specific accessibility requirements and limitations existing on browsers and assistive technology (mostly).&lt;br /&gt;
&lt;br /&gt;
Currently Firefox 3.5+ and JAWS 11 provide the best accessibility experience with CKEditor. These tools are our recommendation when accessibility is needed. IE8 is also a good option, but not as good as Firefox 3.5.&lt;br /&gt;
&lt;br /&gt;
== The &amp;quot;application&amp;quot; root ==&lt;br /&gt;
&lt;br /&gt;
Each of the editor instances is enclosed into the following element, placed in the exact DOM location we expect the editor to be shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span id=&amp;quot;cke_[editor-name]&amp;quot; role=&amp;quot;application&amp;quot; aria-labelledby=&amp;quot;cke_[editor-name]_arialbl&amp;quot; ...&amp;gt;&lt;br /&gt;
    &amp;lt;span id=&amp;quot;cke_[editor-name]_arialbl&amp;quot;&amp;gt;Rich Text Editor&amp;lt;/span&amp;gt;&lt;br /&gt;
    ....&lt;br /&gt;
    [ Here goes the editor ]&lt;br /&gt;
    ....&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This created a landmark in the page for each editor, and ATs should enter in application mode when reaching it.&lt;br /&gt;
&lt;br /&gt;
== The inner structure ==&lt;br /&gt;
&lt;br /&gt;
Inside the application root, we have a complex structure that defines the editor interface. We have a couple of &amp;lt;nowiki&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/nowiki&amp;gt; elements holding a &amp;lt;nowiki&amp;gt;&amp;lt;table&amp;gt;&amp;lt;/nowiki&amp;gt; element which defines the main editor spaces: top, contents and bottom. This complex structure is necessary to workaround CSS limitations present in some browsers (IE6/IE Quirks).&lt;br /&gt;
&lt;br /&gt;
Here is a simplification of it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span ...&amp;gt;&lt;br /&gt;
    &amp;lt;span ...&amp;gt;&lt;br /&gt;
        &amp;lt;table ...&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;cke_top&amp;quot; ...&amp;gt;&lt;br /&gt;
                [ Top elements ]&lt;br /&gt;
            &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;cke_contents&amp;quot; ...&amp;gt;&lt;br /&gt;
                [ Contents elements ]&lt;br /&gt;
            &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;cke_bottom&amp;quot; ...&amp;gt;&lt;br /&gt;
                [ Bottom elements ]&lt;br /&gt;
            &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All elements in this structure are marked with the &amp;quot;presentation&amp;quot; role. In this way they are ignored in the accessibility description of the page.&lt;br /&gt;
&lt;br /&gt;
== The Toolbar ==&lt;br /&gt;
&lt;br /&gt;
The editor toolbar is rendered, by default, into the top space of the inner editor structure. Internally, it's called instead &amp;quot;toolbox&amp;quot;, which holds a series of small &amp;quot;toolbars&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The following represents its structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;div role=&amp;quot;toolbar&amp;quot; class=&amp;quot;cke_toolbox&amp;quot; aria-labelledby=&amp;quot;cke_[number]&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;span id=&amp;quot;cke_[number]&amp;quot;&amp;gt;Toolbar&amp;lt;/span&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    [ &amp;quot;n&amp;quot; toolbars]&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside the above toolbox we'll have then several &amp;quot;toolbars&amp;quot;, each of them having the following structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;cke_toolbar&amp;quot; role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    [ &amp;quot;n&amp;quot; toolbar groups ]&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each toolbar will then contain a series of &amp;quot;toolbar groups&amp;quot;, with the following structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;cke_toolgroup&amp;quot; role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    [ &amp;quot;n&amp;quot; toolbar items ]&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This complex structure makes the UI quite flexible, so rich skinning is possible.&lt;br /&gt;
&lt;br /&gt;
Finally, the toolbar groups hold the toolbar items. Currently, the following types of items are available: Button, Menu Button and Combo Box.&lt;br /&gt;
&lt;br /&gt;
When moving the UI focus into the toolbar (ALT+F10), it's first element is focused.&lt;br /&gt;
&lt;br /&gt;
=== Toolbar Button ===&lt;br /&gt;
&lt;br /&gt;
The following is the structure of a toolbar Button (e.g. the Source button):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;cke_button&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;a role=&amp;quot;button&amp;quot; aria-labelledby=&amp;quot;cke_5_label&amp;quot; tabindex=&amp;quot;-1&amp;quot; title=&amp;quot;Source&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;span class=&amp;quot;cke_icon&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;span class=&amp;quot;cke_label&amp;quot; id=&amp;quot;cke_5_label&amp;quot;&amp;gt;Source&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Toolbar Menu Button ===&lt;br /&gt;
&lt;br /&gt;
The following is the structure of a toolbar Menu Button (e.g. the Text Color button):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;cke_button&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;a role=&amp;quot;button&amp;quot; aria-haspopup=&amp;quot;true&amp;quot; aria-labelledby=&amp;quot;cke_75_label&amp;quot; tabindex=&amp;quot;-1&amp;quot; title=&amp;quot;Text Color&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;span class=&amp;quot;cke_icon&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;span class=&amp;quot;cke_label&amp;quot; id=&amp;quot;cke_75_label&amp;quot;&amp;gt;Text Color&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;span class=&amp;quot;cke_buttonarrow&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Toolbar Combo Box ===&lt;br /&gt;
&lt;br /&gt;
The following is the structure of a toolbar Combo Box (e.g. the Font Size combo box):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;cke_rcombo&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;span class=&amp;quot;cke_fontSize cke_off&amp;quot; id=&amp;quot;cke_73&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;span class=&amp;quot;cke_label&amp;quot; id=&amp;quot;cke_73_label&amp;quot;&amp;gt;Size&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;a role=&amp;quot;button&amp;quot; aria-haspopup=&amp;quot;true&amp;quot; aria-labelledby=&amp;quot;cke_73_label&amp;quot; aria-describedby=&amp;quot;cke_73_text&amp;quot; tabindex=&amp;quot;-1&amp;quot; title=&amp;quot;Font Size&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;span&amp;gt;&lt;br /&gt;
                &amp;lt;span id=&amp;quot;cke_73_text&amp;quot;&amp;gt;[ Current Value ]&amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;span class=&amp;quot;cke_openbutton&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;/a&amp;gt;&lt;br /&gt;
    &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the visually impaired, what we graphically represent and call as combos will act just like Menu Buttons. This is done because the user must activate it by pressing space bar, instead of changing their values directly with the arrow keys. This brings no usability impact to the visually impaired.&lt;br /&gt;
&lt;br /&gt;
When activating (opening) a combo, a floating panel is created on the fly, holding the list of items available for that combo. The following structure represents it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;div role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;iframe role=&amp;quot;listbox&amp;quot; aria-label=&amp;quot;Font Size&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            &amp;lt;html&amp;gt;&lt;br /&gt;
                &amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;
            &amp;lt;body&amp;gt;&lt;br /&gt;
                &amp;lt;div tabindex=&amp;quot;-1&amp;quot; role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;h1 role=&amp;quot;presentation&amp;quot;&amp;gt;Font Size&amp;lt;/h1&amp;gt;&lt;br /&gt;
                    &amp;lt;ul role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Item --&amp;gt;&lt;br /&gt;
                        &amp;lt;li&amp;gt;&lt;br /&gt;
                            &amp;lt;a role=&amp;quot;option&amp;quot; aria-posinset=&amp;quot;1&amp;quot; title=&amp;quot;8&amp;quot; aria-setsize=&amp;quot;16&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;span&amp;gt;8&amp;lt;/span&amp;gt;&lt;br /&gt;
                            &amp;lt;/a&amp;gt;&lt;br /&gt;
                        &amp;lt;/li&amp;gt;&lt;br /&gt;
                        ...&lt;br /&gt;
                        [ Repetitions of the above &amp;lt;li&amp;gt; structure for each item in the list ]&lt;br /&gt;
                        ...&lt;br /&gt;
                    &amp;lt;/ul&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/body&amp;gt;&lt;br /&gt;
            &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;/iframe&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After opened, the UI focus is set to the &amp;quot;listbox&amp;quot; &amp;lt;iframe&amp;gt;. Then, when using the ARROW-DOWN key, the first list item is focused.&lt;br /&gt;
&lt;br /&gt;
== The Elements Path ==&lt;br /&gt;
&lt;br /&gt;
The Elements Path is rendered at the bottom space of the inner structure of the editor. The following represents its structure scheme:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span id=&amp;quot;cke_path_editor1_label&amp;quot;&amp;gt;Elements path&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div role=&amp;quot;group&amp;quot; aria-labelledby=&amp;quot;cke_path_editor1_label&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;a role=&amp;quot;button&amp;quot; aria-labelledby=&amp;quot;cke_elementspath_2_2_label&amp;quot; title=&amp;quot;body element&amp;quot; tabindex=&amp;quot;-1&amp;quot;&amp;gt;&lt;br /&gt;
        body&lt;br /&gt;
        &amp;lt;span id=&amp;quot;cke_elementspath_2_2_label&amp;quot;&amp;gt;body element&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;/a&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    [ Several of the above &amp;lt;a&amp;gt; structures for each element ]&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When moving the UI focus into the elements path (ALT+F11), the button representing it's deeper element is focused.&lt;br /&gt;
&lt;br /&gt;
== The Editing Area ==&lt;br /&gt;
&lt;br /&gt;
The editing area is rendered into the contents space of the inner editor structure. By default the editor provides two editing modes: WYSIWYG and Source.&lt;br /&gt;
&lt;br /&gt;
=== WYSIWYG Mode ===&lt;br /&gt;
&lt;br /&gt;
In WYSIWYG mode, the editor renders an &amp;lt;iframe&amp;gt; element, setting its contents as editable through the contenteditable attribute in the &amp;lt;body&amp;gt; element (for IE only) or the document.designMode DOM property (all other browsers).&lt;br /&gt;
&lt;br /&gt;
The following represents this structure, including the inner document:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;iframe tabindex=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;html&amp;gt;&lt;br /&gt;
        &amp;lt;head&amp;gt;&lt;br /&gt;
            &amp;lt;title&amp;gt;Rich text editor, editor1, press ALT 0 for help.&amp;lt;/title&amp;gt;&lt;br /&gt;
        &amp;lt;/head&amp;gt;&lt;br /&gt;
        &amp;lt;body&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
        [ The raw HTML contents of the editor ]&lt;br /&gt;
        ...&lt;br /&gt;
        &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that no ARIA attributes are used here. ATs should use the default role for HTML documents, which is &amp;quot;document&amp;quot;, enhanced by the enabled editing support.&lt;br /&gt;
&lt;br /&gt;
=== Source Mode ===&lt;br /&gt;
&lt;br /&gt;
In Source mode, the editor simply renders a &amp;lt;textarea&amp;gt; element. The following represents its definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;textarea tabindex=&amp;quot;0&amp;quot; role=&amp;quot;textbox&amp;quot; aria-label=&amp;quot;Rich text editor, editor1, press ALT 0 for help.&amp;quot;&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    [ The raw HTML contents of the editor ]&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/textarea&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Focus grabbing ===&lt;br /&gt;
&lt;br /&gt;
The application root doesn't wait for user focus directly (tabindex=-1). It instead expects having elements inside of it that would participate in the page tabbing order.&lt;br /&gt;
&lt;br /&gt;
In a standard editor installation, the editing area is the only element that participates into the page tabbing. The tabindex used for it is inherited from the &amp;lt;textarea&amp;gt; replaced by the editor, or even specified through the &amp;quot;tabIndex&amp;quot; setting.&lt;br /&gt;
&lt;br /&gt;
In the WYSIWYG mode, the element that receives the focus is the &amp;lt;iframe&amp;gt; element that holds the editable document. In Source mode, we have instead a normal &amp;lt;textarea&amp;gt; element.&lt;br /&gt;
&lt;br /&gt;
None of the other UI elements in the editor, like the toolbar or the elements path, will participate in the page tabbing order. Focus and tabbing in these elements is managed by the editor code.&lt;br /&gt;
&lt;br /&gt;
== Dialogs ==&lt;br /&gt;
&lt;br /&gt;
Some of the editor commands open UI dialogs. Those are floating elements usually used to request user information for the creation and modification of specific elements, like links and tables.&lt;br /&gt;
&lt;br /&gt;
The following is a sample for the full structure of a dialog, including it's basic UI elements (the Anchor dialog is used to exemplify):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;div role=&amp;quot;dialog&amp;quot; aria-labelledby=&amp;quot;cke_dialog_title_91&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;table role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&amp;lt;td role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div role=&amp;quot;presentation&amp;quot; class=&amp;quot;cke_dialog_body&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;!-- Title --&amp;gt;&lt;br /&gt;
                &amp;lt;div role=&amp;quot;presentation&amp;quot; class=&amp;quot;cke_dialog_title&amp;quot; id=&amp;quot;cke_dialog_title_91&amp;quot;&amp;gt;Anchor Properties&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;!-- Close (X) button --&amp;gt;&lt;br /&gt;
                &amp;lt;a role=&amp;quot;button&amp;quot; title=&amp;quot;Close&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;cke_label&amp;quot;&amp;gt;X&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;!-- Tabs (optionally visible) --&amp;gt;&lt;br /&gt;
                &amp;lt;div role=&amp;quot;tablist&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;a role=&amp;quot;tab&amp;quot; aria-labelledby=&amp;quot;info_98_arialbl&amp;quot; tabindex=&amp;quot;-1&amp;quot; title=&amp;quot;Anchor Properties&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;span id=&amp;quot;info_98_arialbl&amp;quot;&amp;gt;Anchor Properties&amp;lt;/span&amp;gt;&lt;br /&gt;
                    &amp;lt;/a&amp;gt;&lt;br /&gt;
                    ...&lt;br /&gt;
                    [ Repetitions of the above &amp;lt;a&amp;gt; for each tab ]&lt;br /&gt;
                    ...&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;!-- Central contents --&amp;gt;&lt;br /&gt;
                &amp;lt;table role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;tr&amp;gt;&amp;lt;td role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;div role=&amp;quot;tabpanel&amp;quot; aria-hidden=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
                            ...&lt;br /&gt;
                            [ Dialog contents ]&lt;br /&gt;
                            ...&lt;br /&gt;
                        &amp;lt;/div&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;!-- Footer buttons --&amp;gt;&lt;br /&gt;
                &amp;lt;div role=&amp;quot;presentation&amp;quot; class=&amp;quot;cke_dialog_footer&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;table role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&amp;lt;td role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
                            &amp;lt;a role=&amp;quot;button&amp;quot; aria-labelledby=&amp;quot;100_label&amp;quot; title=&amp;quot;OK&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;span id=&amp;quot;100_label&amp;quot;&amp;gt;OK&amp;lt;/span&amp;gt;&lt;br /&gt;
                            &amp;lt;/a&amp;gt;&lt;br /&gt;
                        &amp;lt;/td&amp;gt;&lt;br /&gt;
                        ...&lt;br /&gt;
                        [ The same &amp;lt;td&amp;gt; structure for the &amp;quot;Cancel&amp;quot; button ]&lt;br /&gt;
                        ...&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                    &amp;lt;/table&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
            ...&lt;br /&gt;
        &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As soon as the dialog is rendered, the UI focus is set into one of its content elements (usually an &amp;lt;input&amp;gt; element).&lt;br /&gt;
&lt;br /&gt;
Tabbing inside dialogs is managed by the editor code.&lt;br /&gt;
&lt;br /&gt;
== Context Menu ==&lt;br /&gt;
&lt;br /&gt;
The context menu is a floating element created on the fly at first open. This element holds an &amp;lt;iframe&amp;gt; element into which the menu contents is rendered. &lt;br /&gt;
&lt;br /&gt;
The following represents its structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;div role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;iframe role=&amp;quot;menu&amp;quot; aria-label=&amp;quot;Options&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            &amp;lt;html&amp;gt;&lt;br /&gt;
            &amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;
            &amp;lt;body&amp;gt;&lt;br /&gt;
                &amp;lt;div tabindex=&amp;quot;-1&amp;quot; role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;div role=&amp;quot;presentation&amp;quot; class=&amp;quot;cke_menu&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;!-- Menu item --&amp;gt;&lt;br /&gt;
                        &amp;lt;span class=&amp;quot;cke_menuitem&amp;quot;&amp;gt;&lt;br /&gt;
                            &amp;lt;a role=&amp;quot;menuitem&amp;quot; tabindex=&amp;quot;-1&amp;quot; title=&amp;quot;Cut&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;span class=&amp;quot;cke_icon_wrapper&amp;quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
                                &amp;lt;span class=&amp;quot;cke_label&amp;quot;&amp;gt;Cut&amp;lt;/span&amp;gt;&lt;br /&gt;
                            &amp;lt;/a&amp;gt;&lt;br /&gt;
                        &amp;lt;/span&amp;gt;&lt;br /&gt;
                        ...&lt;br /&gt;
                        [ Repetitions of the above &amp;lt;span&amp;gt; structure of each menu item ]&lt;br /&gt;
                        ...&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/body&amp;gt;&lt;br /&gt;
            &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;/iframe&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When opened, the UI focus is set to the &amp;quot;menu&amp;quot; &amp;lt;iframe&amp;gt;. Then, when using the ARROW-DOWN key, the first menu item is focused.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
* Floating elements, like dialogs, context menus or combos and menu buttons panels, are not created inside the application root element. They are instead placed at the very end of the page structure, right before the &amp;lt;/body&amp;gt; element closing. It's done in this way because a single panel can be used by more than one editor instance present in the page (to enhance performance and save resources).&lt;br /&gt;
&lt;br /&gt;
* We avoid using &amp;quot;aria-label&amp;quot;, using instead &amp;quot;aria-labelledby&amp;quot;. In an ARIA point of view, this is not necessary in most cases, and it even makes the DOM structure and our code more complex, but unfortunately IE has no support for &amp;quot;aria-label&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
* The aria-disabled attribute is properly used to indicate buttons and menu options that are disabled.&lt;br /&gt;
&lt;br /&gt;
* We use the &amp;lt;a&amp;gt; element for several UI elements (like buttons, menu items, tabs, etc). In this way we are able to use the :hover CSS pseudo-class, which is not supported in all elements in some browsers.&lt;br /&gt;
&lt;br /&gt;
* The HTML structures illustrated in this page are not complete, including exclusively the elements and attributes that have ARIA relevance or that enhances the structure understanding.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/ARIA_Described&amp;diff=2848</id>
		<title>FCKeditor 3.x/Design and Architecture/ARIA Described</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/ARIA_Described&amp;diff=2848"/>
				<updated>2010-02-17T13:14:29Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: /* The inner structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides technical information about the ARIA support provided in CKEditor (starting at version 3.2.).&lt;br /&gt;
&lt;br /&gt;
CKEditor 3.2 is fully &amp;quot;ARIA aware&amp;quot;. In fact all the accessibility support preset in the editor core has been switched to ARIA, without considering specific accessibility requirements and limitations existing on browsers and assistive technology (mostly).&lt;br /&gt;
&lt;br /&gt;
Currently Firefox 3.5+ and JAWS 11 provide the best accessibility experience with CKEditor. These tools are our recommendation when accessibility is needed. IE8 is also a good option, but not as good as Firefox 3.5.&lt;br /&gt;
&lt;br /&gt;
== The &amp;quot;application&amp;quot; root ==&lt;br /&gt;
&lt;br /&gt;
Each of the editor instances is enclosed into the following element, placed in the exact DOM location we expect the editor to be shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span id=&amp;quot;cke_[editor-name]&amp;quot; role=&amp;quot;application&amp;quot; aria-labelledby=&amp;quot;cke_[editor-name]_arialbl&amp;quot; ...&amp;gt;&lt;br /&gt;
    &amp;lt;span id=&amp;quot;cke_[editor-name]_arialbl&amp;quot;&amp;gt;Rich Text Editor&amp;lt;/span&amp;gt;&lt;br /&gt;
    ....&lt;br /&gt;
    [ Here goes the editor ]&lt;br /&gt;
    ....&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This created a landmark in the page for each editor, and ATs should enter in application mode when reaching it.&lt;br /&gt;
&lt;br /&gt;
== The inner structure ==&lt;br /&gt;
&lt;br /&gt;
Inside the application root, we have a complex structure that defines the editor interface. We have a couple of &amp;lt;nowiki&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/nowiki&amp;gt; elements holding a &amp;lt;nowiki&amp;gt;&amp;lt;table&amp;gt;&amp;lt;/nowiki&amp;gt; element which defines the main editor spaces: top, contents and bottom. This complex structure is necessary to workaround CSS limitations present in some browsers (IE6/IE Quirks).&lt;br /&gt;
&lt;br /&gt;
Here is a simplification of it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span ...&amp;gt;&lt;br /&gt;
    &amp;lt;span ...&amp;gt;&lt;br /&gt;
        &amp;lt;table ...&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;cke_top&amp;quot; ...&amp;gt;&lt;br /&gt;
                [ Top elements ]&lt;br /&gt;
            &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;cke_contents&amp;quot; ...&amp;gt;&lt;br /&gt;
                [ Contents elements ]&lt;br /&gt;
            &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;cke_bottom&amp;quot; ...&amp;gt;&lt;br /&gt;
                [ Bottom elements ]&lt;br /&gt;
            &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All elements in this structure are marked with the &amp;quot;presentation&amp;quot; role. In this way they are ignored in the accessibility description of the page.&lt;br /&gt;
&lt;br /&gt;
== The Toolbar ==&lt;br /&gt;
&lt;br /&gt;
The editor toolbar is rendered, by default, into the top space of the inner editor structure. Internally, it's called instead &amp;quot;toolbox&amp;quot;, which holds a series of small &amp;quot;toolbars&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The following represents its structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;div role=&amp;quot;toolbar&amp;quot; class=&amp;quot;cke_toolbox&amp;quot; aria-labelledby=&amp;quot;cke_[number]&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;span id=&amp;quot;cke_[number]&amp;quot;&amp;gt;Toolbar&amp;lt;/span&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    [ &amp;quot;n&amp;quot; toolbars]&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside the above toolbox we'll have then several &amp;quot;toolbars&amp;quot;, each of them having the following structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;cke_toolbar&amp;quot; role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    [ &amp;quot;n&amp;quot; toolbar groups ]&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each toolbar will then contain a series of &amp;quot;toolbar groups&amp;quot;, with the following structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;cke_toolgroup&amp;quot; role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    [ &amp;quot;n&amp;quot; toolbar items ]&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This complex structure makes the UI quite flexible, so rich skinning is possible.&lt;br /&gt;
&lt;br /&gt;
Finally, the toolbar groups hold the toolbar items. Currently, the following types of items are available: Button, Menu Button and Combo Box.&lt;br /&gt;
&lt;br /&gt;
When moving the UI focus into the toolbar (ALT+F10), it's first element is focused.&lt;br /&gt;
&lt;br /&gt;
=== Toolbar Button ===&lt;br /&gt;
&lt;br /&gt;
The following is the structure of a toolbar Button (e.g. the Source button):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;cke_button&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;a role=&amp;quot;button&amp;quot; aria-labelledby=&amp;quot;cke_5_label&amp;quot; tabindex=&amp;quot;-1&amp;quot; title=&amp;quot;Source&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;span class=&amp;quot;cke_icon&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;span class=&amp;quot;cke_label&amp;quot; id=&amp;quot;cke_5_label&amp;quot;&amp;gt;Source&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Toolbar Menu Button ===&lt;br /&gt;
&lt;br /&gt;
The following is the structure of a toolbar Menu Button (e.g. the Text Color button):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;cke_button&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;a role=&amp;quot;button&amp;quot; aria-haspopup=&amp;quot;true&amp;quot; aria-labelledby=&amp;quot;cke_75_label&amp;quot; tabindex=&amp;quot;-1&amp;quot; title=&amp;quot;Text Color&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;span class=&amp;quot;cke_icon&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;span class=&amp;quot;cke_label&amp;quot; id=&amp;quot;cke_75_label&amp;quot;&amp;gt;Text Color&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;span class=&amp;quot;cke_buttonarrow&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Toolbar Combo Box ===&lt;br /&gt;
&lt;br /&gt;
The following is the structure of a toolbar Combo Box (e.g. the Font Size combo box):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;cke_rcombo&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;span class=&amp;quot;cke_fontSize cke_off&amp;quot; id=&amp;quot;cke_73&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;span class=&amp;quot;cke_label&amp;quot; id=&amp;quot;cke_73_label&amp;quot;&amp;gt;Size&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;a role=&amp;quot;button&amp;quot; aria-haspopup=&amp;quot;true&amp;quot; aria-labelledby=&amp;quot;cke_73_label&amp;quot; aria-describedby=&amp;quot;cke_73_text&amp;quot; tabindex=&amp;quot;-1&amp;quot; title=&amp;quot;Font Size&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;span&amp;gt;&lt;br /&gt;
                &amp;lt;span id=&amp;quot;cke_73_text&amp;quot;&amp;gt;[ Current Value ]&amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;span class=&amp;quot;cke_openbutton&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;/a&amp;gt;&lt;br /&gt;
    &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the visually impaired, what we graphically represent and call as combos will act just like Menu Buttons. This is done because the user must activate it by pressing space bar, instead of changing their values directly with the arrow keys. This brings no usability impact to the visually impaired.&lt;br /&gt;
&lt;br /&gt;
When activating (opening) a combo, a floating panel is created on the fly, holding the list of items available for that combo. The following structure represents it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;div role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;iframe role=&amp;quot;listbox&amp;quot; aria-label=&amp;quot;Font Size&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            &amp;lt;html&amp;gt;&lt;br /&gt;
                &amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;
            &amp;lt;body&amp;gt;&lt;br /&gt;
                &amp;lt;div tabindex=&amp;quot;-1&amp;quot; role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;h1 role=&amp;quot;presentation&amp;quot;&amp;gt;Font Size&amp;lt;/h1&amp;gt;&lt;br /&gt;
                    &amp;lt;ul role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Item --&amp;gt;&lt;br /&gt;
                        &amp;lt;li&amp;gt;&lt;br /&gt;
                            &amp;lt;a role=&amp;quot;option&amp;quot; aria-posinset=&amp;quot;1&amp;quot; title=&amp;quot;8&amp;quot; aria-setsize=&amp;quot;16&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;span&amp;gt;8&amp;lt;/span&amp;gt;&lt;br /&gt;
                            &amp;lt;/a&amp;gt;&lt;br /&gt;
                        &amp;lt;/li&amp;gt;&lt;br /&gt;
                        ...&lt;br /&gt;
                        [ Repetitions of the above &amp;lt;li&amp;gt; structure for each item in the list ]&lt;br /&gt;
                        ...&lt;br /&gt;
                    &amp;lt;/ul&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/body&amp;gt;&lt;br /&gt;
            &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;/iframe&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After opened, the UI focus is set to the &amp;quot;listbox&amp;quot; &amp;lt;iframe&amp;gt;. Then, when using the ARROW-DOWN key, the first list item is focused.&lt;br /&gt;
&lt;br /&gt;
== The Elements Path ==&lt;br /&gt;
&lt;br /&gt;
The Elements Path is rendered at the bottom space of the inner structure of the editor. The following represents its structure scheme:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span id=&amp;quot;cke_path_editor1_label&amp;quot;&amp;gt;Elements path&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div role=&amp;quot;group&amp;quot; aria-labelledby=&amp;quot;cke_path_editor1_label&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;a role=&amp;quot;button&amp;quot; aria-labelledby=&amp;quot;cke_elementspath_2_2_label&amp;quot; title=&amp;quot;body element&amp;quot; tabindex=&amp;quot;-1&amp;quot;&amp;gt;&lt;br /&gt;
        body&lt;br /&gt;
        &amp;lt;span id=&amp;quot;cke_elementspath_2_2_label&amp;quot;&amp;gt;body element&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;/a&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    [ Several of the above &amp;lt;a&amp;gt; structures for each element ]&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When moving the UI focus into the elements path (ALT+F11), the button representing it's deeper element is focused.&lt;br /&gt;
&lt;br /&gt;
== The Editing Area ==&lt;br /&gt;
&lt;br /&gt;
The editing area is rendered into the contents space of the inner editor structure. By default the editor provides two editing modes: WYSIWYG and Source.&lt;br /&gt;
&lt;br /&gt;
=== WYSIWYG Mode ===&lt;br /&gt;
&lt;br /&gt;
In WYSIWYG mode, the editor renders an &amp;lt;iframe&amp;gt; element, setting its contents as editable through the contenteditable attribute in the &amp;lt;body&amp;gt; element (for IE only) or the document.designMode DOM property (all other browsers).&lt;br /&gt;
&lt;br /&gt;
The following represents this structure, including the inner document:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;iframe tabindex=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;html&amp;gt;&lt;br /&gt;
        &amp;lt;head&amp;gt;&lt;br /&gt;
            &amp;lt;title&amp;gt;Rich text editor, editor1, press ALT 0 for help.&amp;lt;/title&amp;gt;&lt;br /&gt;
        &amp;lt;/head&amp;gt;&lt;br /&gt;
        &amp;lt;body&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
        [ The raw HTML contents of the editor ]&lt;br /&gt;
        ...&lt;br /&gt;
        &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that no ARIA attributes are used here. ATs should use the default role for HTML documents, which is &amp;quot;document&amp;quot;, enhanced by the enabled editing support.&lt;br /&gt;
&lt;br /&gt;
=== Source Mode ===&lt;br /&gt;
&lt;br /&gt;
In Source mode, the editor simply renders a &amp;lt;textarea&amp;gt; element. The following represents its definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;textarea tabindex=&amp;quot;0&amp;quot; role=&amp;quot;textbox&amp;quot; aria-label=&amp;quot;Rich text editor, editor1, press ALT 0 for help.&amp;quot;&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    [ The raw HTML contents of the editor ]&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/textarea&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Focus grabbing ===&lt;br /&gt;
&lt;br /&gt;
The application root doesn't wait for user focus directly (tabindex=-1). It instead expects having elements inside of it that would participate in the page tabbing order.&lt;br /&gt;
&lt;br /&gt;
In a standard editor installation, the editing area is the only element that participates into the page tabbing. The tabindex used for it is inherited from the &amp;lt;textarea&amp;gt; replaced by the editor, or even specified through the &amp;quot;tabIndex&amp;quot; setting.&lt;br /&gt;
&lt;br /&gt;
In the WYSIWYG mode, the element that receives the focus is the &amp;lt;iframe&amp;gt; element that holds the editable document. In Source mode, we have instead a normal &amp;lt;textarea&amp;gt; element.&lt;br /&gt;
&lt;br /&gt;
None of the other UI elements in the editor, like the toolbar or the elements path, will participate in the page tabbing order. Focus and tabbing in these elements is managed by the editor code.&lt;br /&gt;
&lt;br /&gt;
== Dialogs ==&lt;br /&gt;
&lt;br /&gt;
Some of the editor commands open UI dialogs. Those are floating elements usually used to request user information for the creation and modification of specific elements, like links and tables.&lt;br /&gt;
&lt;br /&gt;
The following is a sample for the full structure of a dialog, including it's basic UI elements (the Anchor dialog is used to exemplify):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;div role=&amp;quot;dialog&amp;quot; aria-labelledby=&amp;quot;cke_dialog_title_91&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;table role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&amp;lt;td role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div role=&amp;quot;presentation&amp;quot; class=&amp;quot;cke_dialog_body&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;!-- Title --&amp;gt;&lt;br /&gt;
                &amp;lt;div role=&amp;quot;presentation&amp;quot; class=&amp;quot;cke_dialog_title&amp;quot; id=&amp;quot;cke_dialog_title_91&amp;quot;&amp;gt;Anchor Properties&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;!-- Close (X) button --&amp;gt;&lt;br /&gt;
                &amp;lt;a role=&amp;quot;button&amp;quot; title=&amp;quot;Close&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;cke_label&amp;quot;&amp;gt;X&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;!-- Tabs (optionally visible) --&amp;gt;&lt;br /&gt;
                &amp;lt;div role=&amp;quot;tablist&amp;quot; aria-labelledby=&amp;quot;cke_dialog_tabs_91_arialbl&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;span id=&amp;quot;cke_dialog_tabs_91_arialbl&amp;quot;&amp;gt;Dialog Tabs&amp;lt;/span&amp;gt;&lt;br /&gt;
                    &amp;lt;a role=&amp;quot;tab&amp;quot; aria-labelledby=&amp;quot;info_98_arialbl&amp;quot; tabindex=&amp;quot;-1&amp;quot; title=&amp;quot;Anchor Properties&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;span id=&amp;quot;info_98_arialbl&amp;quot;&amp;gt;Anchor Properties&amp;lt;/span&amp;gt;&lt;br /&gt;
                    &amp;lt;/a&amp;gt;&lt;br /&gt;
                    ...&lt;br /&gt;
                    [ Repetitions of the above &amp;lt;a&amp;gt; for each tab ]&lt;br /&gt;
                    ...&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;!-- Central contents --&amp;gt;&lt;br /&gt;
                &amp;lt;table role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;tr&amp;gt;&amp;lt;td role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;div role=&amp;quot;tabpanel&amp;quot; aria-hidden=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
                            ...&lt;br /&gt;
                            [ Dialog contents ]&lt;br /&gt;
                            ...&lt;br /&gt;
                        &amp;lt;/div&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;!-- Footer buttons --&amp;gt;&lt;br /&gt;
                &amp;lt;div role=&amp;quot;presentation&amp;quot; class=&amp;quot;cke_dialog_footer&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;table role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&amp;lt;td role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
                            &amp;lt;a role=&amp;quot;button&amp;quot; aria-labelledby=&amp;quot;100_label&amp;quot; title=&amp;quot;OK&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;span id=&amp;quot;100_label&amp;quot;&amp;gt;OK&amp;lt;/span&amp;gt;&lt;br /&gt;
                            &amp;lt;/a&amp;gt;&lt;br /&gt;
                        &amp;lt;/td&amp;gt;&lt;br /&gt;
                        ...&lt;br /&gt;
                        [ The same &amp;lt;td&amp;gt; structure for the &amp;quot;Cancel&amp;quot; button ]&lt;br /&gt;
                        ...&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                    &amp;lt;/table&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
            ...&lt;br /&gt;
        &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As soon as the dialog is rendered, the UI focus is set into one of its content elements (usually an &amp;lt;input&amp;gt; element).&lt;br /&gt;
&lt;br /&gt;
Tabbing inside dialogs is managed by the editor code.&lt;br /&gt;
&lt;br /&gt;
== Context Menu ==&lt;br /&gt;
&lt;br /&gt;
The context menu is a floating element created on the fly at first open. This element holds an &amp;lt;iframe&amp;gt; element into which the menu contents is rendered. &lt;br /&gt;
&lt;br /&gt;
The following represents its structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;div role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;iframe role=&amp;quot;menu&amp;quot; aria-label=&amp;quot;Options&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            &amp;lt;html&amp;gt;&lt;br /&gt;
            &amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;
            &amp;lt;body&amp;gt;&lt;br /&gt;
                &amp;lt;div tabindex=&amp;quot;-1&amp;quot; role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;div role=&amp;quot;presentation&amp;quot; class=&amp;quot;cke_menu&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;!-- Menu item --&amp;gt;&lt;br /&gt;
                        &amp;lt;span class=&amp;quot;cke_menuitem&amp;quot;&amp;gt;&lt;br /&gt;
                            &amp;lt;a role=&amp;quot;menuitem&amp;quot; tabindex=&amp;quot;-1&amp;quot; title=&amp;quot;Cut&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;span class=&amp;quot;cke_icon_wrapper&amp;quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
                                &amp;lt;span class=&amp;quot;cke_label&amp;quot;&amp;gt;Cut&amp;lt;/span&amp;gt;&lt;br /&gt;
                            &amp;lt;/a&amp;gt;&lt;br /&gt;
                        &amp;lt;/span&amp;gt;&lt;br /&gt;
                        ...&lt;br /&gt;
                        [ Repetitions of the above &amp;lt;span&amp;gt; structure of each menu item ]&lt;br /&gt;
                        ...&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/body&amp;gt;&lt;br /&gt;
            &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;/iframe&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When opened, the UI focus is set to the &amp;quot;menu&amp;quot; &amp;lt;iframe&amp;gt;. Then, when using the ARROW-DOWN key, the first menu item is focused.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
* Floating elements, like dialogs, context menus or combos and menu buttons panels, are not created inside the application root element. They are instead placed at the very end of the page structure, right before the &amp;lt;/body&amp;gt; element closing. It's done in this way because a single panel can be used by more than one editor instance present in the page (to enhance performance and save resources).&lt;br /&gt;
&lt;br /&gt;
* We avoid using &amp;quot;aria-label&amp;quot;, using instead &amp;quot;aria-labelledby&amp;quot;. In an ARIA point of view, this is not necessary in most cases, and it even makes the DOM structure and our code more complex, but unfortunately IE has no support for &amp;quot;aria-label&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
* The aria-disabled attribute is properly used to indicate buttons and menu options that are disabled.&lt;br /&gt;
&lt;br /&gt;
* We use the &amp;lt;a&amp;gt; element for several UI elements (like buttons, menu items, tabs, etc). In this way we are able to use the :hover CSS pseudo-class, which is not supported in all elements in some browsers.&lt;br /&gt;
&lt;br /&gt;
* The HTML structures illustrated in this page are not complete, including exclusively the elements and attributes that have ARIA relevance or that enhances the structure understanding.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/ARIA_Described&amp;diff=2847</id>
		<title>FCKeditor 3.x/Design and Architecture/ARIA Described</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/ARIA_Described&amp;diff=2847"/>
				<updated>2010-02-17T13:12:18Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Created page with 'This page provides technical information about the ARIA support provided in CKEditor (starting at version 3.2.).  CKEditor 3.2 is fully &amp;quot;ARIA aware&amp;quot;. In fact all the accessibilit…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides technical information about the ARIA support provided in CKEditor (starting at version 3.2.).&lt;br /&gt;
&lt;br /&gt;
CKEditor 3.2 is fully &amp;quot;ARIA aware&amp;quot;. In fact all the accessibility support preset in the editor core has been switched to ARIA, without considering specific accessibility requirements and limitations existing on browsers and assistive technology (mostly).&lt;br /&gt;
&lt;br /&gt;
Currently Firefox 3.5+ and JAWS 11 provide the best accessibility experience with CKEditor. These tools are our recommendation when accessibility is needed. IE8 is also a good option, but not as good as Firefox 3.5.&lt;br /&gt;
&lt;br /&gt;
== The &amp;quot;application&amp;quot; root ==&lt;br /&gt;
&lt;br /&gt;
Each of the editor instances is enclosed into the following element, placed in the exact DOM location we expect the editor to be shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span id=&amp;quot;cke_[editor-name]&amp;quot; role=&amp;quot;application&amp;quot; aria-labelledby=&amp;quot;cke_[editor-name]_arialbl&amp;quot; ...&amp;gt;&lt;br /&gt;
    &amp;lt;span id=&amp;quot;cke_[editor-name]_arialbl&amp;quot;&amp;gt;Rich Text Editor&amp;lt;/span&amp;gt;&lt;br /&gt;
    ....&lt;br /&gt;
    [ Here goes the editor ]&lt;br /&gt;
    ....&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This created a landmark in the page for each editor, and ATs should enter in application mode when reaching it.&lt;br /&gt;
&lt;br /&gt;
== The inner structure ==&lt;br /&gt;
&lt;br /&gt;
Inside the application root, we have a complex structure that defines the editor interface. We have a couple of &amp;lt;span&amp;gt; elements holding a &amp;lt;table&amp;gt; element which defines the main editor spaces: top, contents and bottom. This complex structure is necessary to workaround CSS limitations present in some browsers (IE6/IE Quirks).&lt;br /&gt;
&lt;br /&gt;
Here is a simplification of it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span ...&amp;gt;&lt;br /&gt;
    &amp;lt;span ...&amp;gt;&lt;br /&gt;
        &amp;lt;table ...&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;cke_top&amp;quot; ...&amp;gt;&lt;br /&gt;
                [ Top elements ]&lt;br /&gt;
            &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;cke_contents&amp;quot; ...&amp;gt;&lt;br /&gt;
                [ Contents elements ]&lt;br /&gt;
            &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
            &amp;lt;tr&amp;gt;&amp;lt;td class=&amp;quot;cke_bottom&amp;quot; ...&amp;gt;&lt;br /&gt;
                [ Bottom elements ]&lt;br /&gt;
            &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
        &amp;lt;/table&amp;gt;&lt;br /&gt;
    &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All elements in this structure are marked with the &amp;quot;presentation&amp;quot; role. In this way they are ignored in the accessibility description of the page.&lt;br /&gt;
&lt;br /&gt;
== The Toolbar ==&lt;br /&gt;
&lt;br /&gt;
The editor toolbar is rendered, by default, into the top space of the inner editor structure. Internally, it's called instead &amp;quot;toolbox&amp;quot;, which holds a series of small &amp;quot;toolbars&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The following represents its structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;div role=&amp;quot;toolbar&amp;quot; class=&amp;quot;cke_toolbox&amp;quot; aria-labelledby=&amp;quot;cke_[number]&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;span id=&amp;quot;cke_[number]&amp;quot;&amp;gt;Toolbar&amp;lt;/span&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    [ &amp;quot;n&amp;quot; toolbars]&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside the above toolbox we'll have then several &amp;quot;toolbars&amp;quot;, each of them having the following structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;cke_toolbar&amp;quot; role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    [ &amp;quot;n&amp;quot; toolbar groups ]&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each toolbar will then contain a series of &amp;quot;toolbar groups&amp;quot;, with the following structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;cke_toolgroup&amp;quot; role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    [ &amp;quot;n&amp;quot; toolbar items ]&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This complex structure makes the UI quite flexible, so rich skinning is possible.&lt;br /&gt;
&lt;br /&gt;
Finally, the toolbar groups hold the toolbar items. Currently, the following types of items are available: Button, Menu Button and Combo Box.&lt;br /&gt;
&lt;br /&gt;
When moving the UI focus into the toolbar (ALT+F10), it's first element is focused.&lt;br /&gt;
&lt;br /&gt;
=== Toolbar Button ===&lt;br /&gt;
&lt;br /&gt;
The following is the structure of a toolbar Button (e.g. the Source button):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;cke_button&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;a role=&amp;quot;button&amp;quot; aria-labelledby=&amp;quot;cke_5_label&amp;quot; tabindex=&amp;quot;-1&amp;quot; title=&amp;quot;Source&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;span class=&amp;quot;cke_icon&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;span class=&amp;quot;cke_label&amp;quot; id=&amp;quot;cke_5_label&amp;quot;&amp;gt;Source&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Toolbar Menu Button ===&lt;br /&gt;
&lt;br /&gt;
The following is the structure of a toolbar Menu Button (e.g. the Text Color button):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;cke_button&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;a role=&amp;quot;button&amp;quot; aria-haspopup=&amp;quot;true&amp;quot; aria-labelledby=&amp;quot;cke_75_label&amp;quot; tabindex=&amp;quot;-1&amp;quot; title=&amp;quot;Text Color&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;span class=&amp;quot;cke_icon&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;span class=&amp;quot;cke_label&amp;quot; id=&amp;quot;cke_75_label&amp;quot;&amp;gt;Text Color&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;span class=&amp;quot;cke_buttonarrow&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Toolbar Combo Box ===&lt;br /&gt;
&lt;br /&gt;
The following is the structure of a toolbar Combo Box (e.g. the Font Size combo box):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;cke_rcombo&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;span class=&amp;quot;cke_fontSize cke_off&amp;quot; id=&amp;quot;cke_73&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;span class=&amp;quot;cke_label&amp;quot; id=&amp;quot;cke_73_label&amp;quot;&amp;gt;Size&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;a role=&amp;quot;button&amp;quot; aria-haspopup=&amp;quot;true&amp;quot; aria-labelledby=&amp;quot;cke_73_label&amp;quot; aria-describedby=&amp;quot;cke_73_text&amp;quot; tabindex=&amp;quot;-1&amp;quot; title=&amp;quot;Font Size&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;span&amp;gt;&lt;br /&gt;
                &amp;lt;span id=&amp;quot;cke_73_text&amp;quot;&amp;gt;[ Current Value ]&amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;/span&amp;gt;&lt;br /&gt;
            &amp;lt;span class=&amp;quot;cke_openbutton&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
        &amp;lt;/a&amp;gt;&lt;br /&gt;
    &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the visually impaired, what we graphically represent and call as combos will act just like Menu Buttons. This is done because the user must activate it by pressing space bar, instead of changing their values directly with the arrow keys. This brings no usability impact to the visually impaired.&lt;br /&gt;
&lt;br /&gt;
When activating (opening) a combo, a floating panel is created on the fly, holding the list of items available for that combo. The following structure represents it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;div role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;iframe role=&amp;quot;listbox&amp;quot; aria-label=&amp;quot;Font Size&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            &amp;lt;html&amp;gt;&lt;br /&gt;
                &amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;
            &amp;lt;body&amp;gt;&lt;br /&gt;
                &amp;lt;div tabindex=&amp;quot;-1&amp;quot; role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;h1 role=&amp;quot;presentation&amp;quot;&amp;gt;Font Size&amp;lt;/h1&amp;gt;&lt;br /&gt;
                    &amp;lt;ul role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;!-- Item --&amp;gt;&lt;br /&gt;
                        &amp;lt;li&amp;gt;&lt;br /&gt;
                            &amp;lt;a role=&amp;quot;option&amp;quot; aria-posinset=&amp;quot;1&amp;quot; title=&amp;quot;8&amp;quot; aria-setsize=&amp;quot;16&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;span&amp;gt;8&amp;lt;/span&amp;gt;&lt;br /&gt;
                            &amp;lt;/a&amp;gt;&lt;br /&gt;
                        &amp;lt;/li&amp;gt;&lt;br /&gt;
                        ...&lt;br /&gt;
                        [ Repetitions of the above &amp;lt;li&amp;gt; structure for each item in the list ]&lt;br /&gt;
                        ...&lt;br /&gt;
                    &amp;lt;/ul&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/body&amp;gt;&lt;br /&gt;
            &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;/iframe&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After opened, the UI focus is set to the &amp;quot;listbox&amp;quot; &amp;lt;iframe&amp;gt;. Then, when using the ARROW-DOWN key, the first list item is focused.&lt;br /&gt;
&lt;br /&gt;
== The Elements Path ==&lt;br /&gt;
&lt;br /&gt;
The Elements Path is rendered at the bottom space of the inner structure of the editor. The following represents its structure scheme:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;span id=&amp;quot;cke_path_editor1_label&amp;quot;&amp;gt;Elements path&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div role=&amp;quot;group&amp;quot; aria-labelledby=&amp;quot;cke_path_editor1_label&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;a role=&amp;quot;button&amp;quot; aria-labelledby=&amp;quot;cke_elementspath_2_2_label&amp;quot; title=&amp;quot;body element&amp;quot; tabindex=&amp;quot;-1&amp;quot;&amp;gt;&lt;br /&gt;
        body&lt;br /&gt;
        &amp;lt;span id=&amp;quot;cke_elementspath_2_2_label&amp;quot;&amp;gt;body element&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;lt;/a&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    [ Several of the above &amp;lt;a&amp;gt; structures for each element ]&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When moving the UI focus into the elements path (ALT+F11), the button representing it's deeper element is focused.&lt;br /&gt;
&lt;br /&gt;
== The Editing Area ==&lt;br /&gt;
&lt;br /&gt;
The editing area is rendered into the contents space of the inner editor structure. By default the editor provides two editing modes: WYSIWYG and Source.&lt;br /&gt;
&lt;br /&gt;
=== WYSIWYG Mode ===&lt;br /&gt;
&lt;br /&gt;
In WYSIWYG mode, the editor renders an &amp;lt;iframe&amp;gt; element, setting its contents as editable through the contenteditable attribute in the &amp;lt;body&amp;gt; element (for IE only) or the document.designMode DOM property (all other browsers).&lt;br /&gt;
&lt;br /&gt;
The following represents this structure, including the inner document:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;iframe tabindex=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;html&amp;gt;&lt;br /&gt;
        &amp;lt;head&amp;gt;&lt;br /&gt;
            &amp;lt;title&amp;gt;Rich text editor, editor1, press ALT 0 for help.&amp;lt;/title&amp;gt;&lt;br /&gt;
        &amp;lt;/head&amp;gt;&lt;br /&gt;
        &amp;lt;body&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
        [ The raw HTML contents of the editor ]&lt;br /&gt;
        ...&lt;br /&gt;
        &amp;lt;/body&amp;gt;&lt;br /&gt;
    &amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that no ARIA attributes are used here. ATs should use the default role for HTML documents, which is &amp;quot;document&amp;quot;, enhanced by the enabled editing support.&lt;br /&gt;
&lt;br /&gt;
=== Source Mode ===&lt;br /&gt;
&lt;br /&gt;
In Source mode, the editor simply renders a &amp;lt;textarea&amp;gt; element. The following represents its definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;textarea tabindex=&amp;quot;0&amp;quot; role=&amp;quot;textbox&amp;quot; aria-label=&amp;quot;Rich text editor, editor1, press ALT 0 for help.&amp;quot;&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    [ The raw HTML contents of the editor ]&lt;br /&gt;
    ...&lt;br /&gt;
&amp;lt;/textarea&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Focus grabbing ===&lt;br /&gt;
&lt;br /&gt;
The application root doesn't wait for user focus directly (tabindex=-1). It instead expects having elements inside of it that would participate in the page tabbing order.&lt;br /&gt;
&lt;br /&gt;
In a standard editor installation, the editing area is the only element that participates into the page tabbing. The tabindex used for it is inherited from the &amp;lt;textarea&amp;gt; replaced by the editor, or even specified through the &amp;quot;tabIndex&amp;quot; setting.&lt;br /&gt;
&lt;br /&gt;
In the WYSIWYG mode, the element that receives the focus is the &amp;lt;iframe&amp;gt; element that holds the editable document. In Source mode, we have instead a normal &amp;lt;textarea&amp;gt; element.&lt;br /&gt;
&lt;br /&gt;
None of the other UI elements in the editor, like the toolbar or the elements path, will participate in the page tabbing order. Focus and tabbing in these elements is managed by the editor code.&lt;br /&gt;
&lt;br /&gt;
== Dialogs ==&lt;br /&gt;
&lt;br /&gt;
Some of the editor commands open UI dialogs. Those are floating elements usually used to request user information for the creation and modification of specific elements, like links and tables.&lt;br /&gt;
&lt;br /&gt;
The following is a sample for the full structure of a dialog, including it's basic UI elements (the Anchor dialog is used to exemplify):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;div role=&amp;quot;dialog&amp;quot; aria-labelledby=&amp;quot;cke_dialog_title_91&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;table role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;tr&amp;gt;&amp;lt;td role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;div role=&amp;quot;presentation&amp;quot; class=&amp;quot;cke_dialog_body&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;!-- Title --&amp;gt;&lt;br /&gt;
                &amp;lt;div role=&amp;quot;presentation&amp;quot; class=&amp;quot;cke_dialog_title&amp;quot; id=&amp;quot;cke_dialog_title_91&amp;quot;&amp;gt;Anchor Properties&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;!-- Close (X) button --&amp;gt;&lt;br /&gt;
                &amp;lt;a role=&amp;quot;button&amp;quot; title=&amp;quot;Close&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;cke_label&amp;quot;&amp;gt;X&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;!-- Tabs (optionally visible) --&amp;gt;&lt;br /&gt;
                &amp;lt;div role=&amp;quot;tablist&amp;quot; aria-labelledby=&amp;quot;cke_dialog_tabs_91_arialbl&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;span id=&amp;quot;cke_dialog_tabs_91_arialbl&amp;quot;&amp;gt;Dialog Tabs&amp;lt;/span&amp;gt;&lt;br /&gt;
                    &amp;lt;a role=&amp;quot;tab&amp;quot; aria-labelledby=&amp;quot;info_98_arialbl&amp;quot; tabindex=&amp;quot;-1&amp;quot; title=&amp;quot;Anchor Properties&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;span id=&amp;quot;info_98_arialbl&amp;quot;&amp;gt;Anchor Properties&amp;lt;/span&amp;gt;&lt;br /&gt;
                    &amp;lt;/a&amp;gt;&lt;br /&gt;
                    ...&lt;br /&gt;
                    [ Repetitions of the above &amp;lt;a&amp;gt; for each tab ]&lt;br /&gt;
                    ...&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;!-- Central contents --&amp;gt;&lt;br /&gt;
                &amp;lt;table role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;tr&amp;gt;&amp;lt;td role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;div role=&amp;quot;tabpanel&amp;quot; aria-hidden=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
                            ...&lt;br /&gt;
                            [ Dialog contents ]&lt;br /&gt;
                            ...&lt;br /&gt;
                        &amp;lt;/div&amp;gt;&lt;br /&gt;
                    &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
                &amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;!-- Footer buttons --&amp;gt;&lt;br /&gt;
                &amp;lt;div role=&amp;quot;presentation&amp;quot; class=&amp;quot;cke_dialog_footer&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;table role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;tr&amp;gt;&amp;lt;td role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
                            &amp;lt;a role=&amp;quot;button&amp;quot; aria-labelledby=&amp;quot;100_label&amp;quot; title=&amp;quot;OK&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;span id=&amp;quot;100_label&amp;quot;&amp;gt;OK&amp;lt;/span&amp;gt;&lt;br /&gt;
                            &amp;lt;/a&amp;gt;&lt;br /&gt;
                        &amp;lt;/td&amp;gt;&lt;br /&gt;
                        ...&lt;br /&gt;
                        [ The same &amp;lt;td&amp;gt; structure for the &amp;quot;Cancel&amp;quot; button ]&lt;br /&gt;
                        ...&lt;br /&gt;
                        &amp;lt;/tr&amp;gt;&lt;br /&gt;
                    &amp;lt;/table&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
            ...&lt;br /&gt;
        &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As soon as the dialog is rendered, the UI focus is set into one of its content elements (usually an &amp;lt;input&amp;gt; element).&lt;br /&gt;
&lt;br /&gt;
Tabbing inside dialogs is managed by the editor code.&lt;br /&gt;
&lt;br /&gt;
== Context Menu ==&lt;br /&gt;
&lt;br /&gt;
The context menu is a floating element created on the fly at first open. This element holds an &amp;lt;iframe&amp;gt; element into which the menu contents is rendered. &lt;br /&gt;
&lt;br /&gt;
The following represents its structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;div role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;iframe role=&amp;quot;menu&amp;quot; aria-label=&amp;quot;Options&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            &amp;lt;html&amp;gt;&lt;br /&gt;
            &amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;
            &amp;lt;body&amp;gt;&lt;br /&gt;
                &amp;lt;div tabindex=&amp;quot;-1&amp;quot; role=&amp;quot;presentation&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;div role=&amp;quot;presentation&amp;quot; class=&amp;quot;cke_menu&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;!-- Menu item --&amp;gt;&lt;br /&gt;
                        &amp;lt;span class=&amp;quot;cke_menuitem&amp;quot;&amp;gt;&lt;br /&gt;
                            &amp;lt;a role=&amp;quot;menuitem&amp;quot; tabindex=&amp;quot;-1&amp;quot; title=&amp;quot;Cut&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;span class=&amp;quot;cke_icon_wrapper&amp;quot;&amp;gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
                                &amp;lt;span class=&amp;quot;cke_label&amp;quot;&amp;gt;Cut&amp;lt;/span&amp;gt;&lt;br /&gt;
                            &amp;lt;/a&amp;gt;&lt;br /&gt;
                        &amp;lt;/span&amp;gt;&lt;br /&gt;
                        ...&lt;br /&gt;
                        [ Repetitions of the above &amp;lt;span&amp;gt; structure of each menu item ]&lt;br /&gt;
                        ...&lt;br /&gt;
                    &amp;lt;/div&amp;gt;&lt;br /&gt;
                &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;/body&amp;gt;&lt;br /&gt;
            &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;/iframe&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When opened, the UI focus is set to the &amp;quot;menu&amp;quot; &amp;lt;iframe&amp;gt;. Then, when using the ARROW-DOWN key, the first menu item is focused.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
* Floating elements, like dialogs, context menus or combos and menu buttons panels, are not created inside the application root element. They are instead placed at the very end of the page structure, right before the &amp;lt;/body&amp;gt; element closing. It's done in this way because a single panel can be used by more than one editor instance present in the page (to enhance performance and save resources).&lt;br /&gt;
&lt;br /&gt;
* We avoid using &amp;quot;aria-label&amp;quot;, using instead &amp;quot;aria-labelledby&amp;quot;. In an ARIA point of view, this is not necessary in most cases, and it even makes the DOM structure and our code more complex, but unfortunately IE has no support for &amp;quot;aria-label&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
* The aria-disabled attribute is properly used to indicate buttons and menu options that are disabled.&lt;br /&gt;
&lt;br /&gt;
* We use the &amp;lt;a&amp;gt; element for several UI elements (like buttons, menu items, tabs, etc). In this way we are able to use the :hover CSS pseudo-class, which is not supported in all elements in some browsers.&lt;br /&gt;
&lt;br /&gt;
* The HTML structures illustrated in this page are not complete, including exclusively the elements and attributes that have ARIA relevance or that enhances the structure understanding.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture&amp;diff=2846</id>
		<title>FCKeditor 3.x/Design and Architecture</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture&amp;diff=2846"/>
				<updated>2010-02-17T13:06:06Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: /* The User Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These pages summarize the ideas, concepts, motivations and specifications for the development of CKEditor 3.0 (code name V3). This is the repository into which converge the results of thoughts and discussions placed around our project. It's a place in tranformation, and you are invited to participate, making it move forward. &lt;br /&gt;
&lt;br /&gt;
== The Project  ==&lt;br /&gt;
&lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/ODE|About the Open Development Effort]] &lt;br /&gt;
*[[FCKeditor 3.x/Contributors|Project Contributors]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Development Methodology|Development Methodology]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Rebranding|Rebranding]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/License|License]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Funding|Funding and Sponsorship]]&lt;br /&gt;
&lt;br /&gt;
== Concepts and Macro Features  ==&lt;br /&gt;
&lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Performance|(High) Performance]]&amp;lt;br&amp;gt; &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Browsers Compatibility|Browsers Compatibility]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Accessibility|Accessibility]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Usability|Usability]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Standards|Standards]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Semantics|Semantics]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Globalization|Globalization]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Plugin Based|Plugin Based]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Event Driven|Event Driven]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/DOM Abstraction|DOM Abstraction]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Memory Leak|Memory Leak Free]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Semantics and Formatting|Semantics and Formatting = Styles]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Documentation|Documentation]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Loading and Startup|Loading and Startup]]&lt;br /&gt;
&lt;br /&gt;
== Coding  ==&lt;br /&gt;
&lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Namespaces|Namespacing]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Coding Style|Coding Style]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Coding Patterns|Coding Patterns]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Native Objects|Native Objects&amp;amp;nbsp;: Untouchable]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Testing|Testing]]&lt;br /&gt;
&lt;br /&gt;
== The User Interface  ==&lt;br /&gt;
&lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Basic Structure|Basic Structure]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Editing Area|Editing Area]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Source Area|Source Area]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Toolbar|Toolbar]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Context Menu|Context Menu]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Elements Path|Elements Path]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Resize Handle|Resize Handle]] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/Dialog System|Dialogs]]&lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/ARIA Described|ARIA Described]]&lt;br /&gt;
&lt;br /&gt;
== Editing Features  ==&lt;br /&gt;
&lt;br /&gt;
*Undo and Redo &lt;br /&gt;
*Cut, Copy and Paste &lt;br /&gt;
*Bold, Italic and Underline &lt;br /&gt;
*Lists &lt;br /&gt;
*Links &lt;br /&gt;
*Images &lt;br /&gt;
*Block Formatting &lt;br /&gt;
*Styles &lt;br /&gt;
*...&lt;br /&gt;
&lt;br /&gt;
== Other Features  ==&lt;br /&gt;
&lt;br /&gt;
*File Browser &lt;br /&gt;
*Spell Checker &lt;br /&gt;
*Debugging -- internal debugger (like FCKDebug)&lt;br /&gt;
&lt;br /&gt;
== Output  ==&lt;br /&gt;
&lt;br /&gt;
*Default XHTML &lt;br /&gt;
*HTML &lt;br /&gt;
*Other Formats -- non HTML&lt;br /&gt;
&lt;br /&gt;
== Customization  ==&lt;br /&gt;
&lt;br /&gt;
*Configuration &lt;br /&gt;
*Skins &lt;br /&gt;
*Plugins&lt;br /&gt;
&lt;br /&gt;
== Integration  ==&lt;br /&gt;
&lt;br /&gt;
*JavaScript API &lt;br /&gt;
*Ajax &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/SSI|Server Side Languages and Platforms]]&lt;br /&gt;
*JavaScript Libraries and Frameworks &lt;br /&gt;
*Targeted Integration Efforts&lt;br /&gt;
&lt;br /&gt;
== Distribution  ==&lt;br /&gt;
&lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture/CKReleaser|Release Building (CKReleaser)]]&lt;br /&gt;
*Installation &lt;br /&gt;
*Compression and Minification &lt;br /&gt;
*Customized Distributions &lt;br /&gt;
*Assets Server / CDN &lt;br /&gt;
*Proxies, Caches and Updates &lt;br /&gt;
*Domain Relaxing &lt;br /&gt;
*HTTPS&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/Coding_Style&amp;diff=2843</id>
		<title>FCKeditor 3.x/Design and Architecture/Coding Style</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/Coding_Style&amp;diff=2843"/>
				<updated>2010-02-02T13:23:10Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: /* Whitespace */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Coding Style Guidelines =&lt;br /&gt;
&lt;br /&gt;
These guidelines where defined based on mixed common standards mainly related to Java programming. It aims to reflect the generally accepted standards for JavaScript coding with some minor adjustments.&lt;br /&gt;
&lt;br /&gt;
It is quite common to take the Java style to write JavaScript code, assuming it is a &amp;quot;cut-down&amp;quot; version of Java. Although JavaScript has an indirect relation with Java, apart from the similar &amp;quot;C     &lt;br /&gt;
== General Recommendations  ==&lt;br /&gt;
&lt;br /&gt;
Any violation to the guide is allowed if it enhances readability. &lt;br /&gt;
&lt;br /&gt;
If the name &amp;quot;CKEditor&amp;quot; is used, if must always be written with &amp;quot;CKE&amp;quot; uppercased concatenated with &amp;quot;ditor&amp;quot; in lowercase. The following usages are wrong: &amp;quot;CKeditor&amp;quot;, &amp;quot;ckEditor&amp;quot;, &amp;quot;CK Editor&amp;quot;, etc. Exceptions are made for directories and file names, which must always be lowercased, and the CKEDITOR namespace name. &lt;br /&gt;
&lt;br /&gt;
If the name &amp;quot;FCKeditor&amp;quot; is used, it must always be written with &amp;quot;FCK&amp;quot; uppercased concatenated with &amp;quot;editor&amp;quot; in lowercase. The following are wrong: &amp;quot;FckEditor&amp;quot;, &amp;quot;FCKEditor&amp;quot;, &amp;quot;fckEditor&amp;quot;, &amp;quot;FCK Editor&amp;quot;, and so on. Exception is made for directory names, where all chars &amp;quot;should&amp;quot; be in lowercase. &lt;br /&gt;
&lt;br /&gt;
The name &amp;quot;JavaScript&amp;quot; should be written with both the &amp;quot;J&amp;quot; and &amp;quot;S&amp;quot; in uppercase. The following are wrong: &amp;quot;Javascript&amp;quot;, &amp;quot;javascript&amp;quot;, etc.&lt;br /&gt;
&lt;br /&gt;
== Naming Conventions ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Name Conventions  ===&lt;br /&gt;
&lt;br /&gt;
The ROOT namespace has a fixed name: CKEDITOR. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing namespaces must be all lowercase. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR.dom, CKEDITOR.env, CKEDITOR.ui&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing public classes and public global objects must be in PascalCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR.dom.Document, CKEDITOR.Util&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing constants must be all UPPERCASE. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR.STATUS_COMPLETE, CKEDITOR.EDITMODE_WYSIWYG, CKEDITOR.CTRL&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing public methods must be verbs and written in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;appendStyleSheet(), getElement (), setTimeout()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing public properties must be nouns and written in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;name, document, targetWindow&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing private methods must be verbs and written in camelCase prefixed with an underscore. &lt;br /&gt;
&amp;lt;pre&amp;gt;_doInternalStuff()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing private properties must be nouns and written in camelCase prefixed with an underscore. &lt;br /&gt;
&amp;lt;pre&amp;gt;_internalCounter, _prefix&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Abbreviations and acronyms should not be uppercase when used as name. &lt;br /&gt;
&amp;lt;pre&amp;gt;setHtml(), XmlDocument&lt;br /&gt;
NOT&lt;br /&gt;
setHTML(), XMLDocument&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
All names should be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Specific Name Conventions ===&lt;br /&gt;
&lt;br /&gt;
The prefixes &amp;quot;get&amp;quot; and &amp;quot;set&amp;quot; may be used on methods that get or set properties which require computation.&lt;br /&gt;
&amp;lt;pre&amp;gt;setArrayCount(), getFormattedValue()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The prefix &amp;quot;checkIs&amp;quot; may be used on methods which return boolean states which require computation.&lt;br /&gt;
&amp;lt;pre&amp;gt;checkIsValid(), checkIsEmpty()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Abbreviations in names should be avoided.&lt;br /&gt;
&amp;lt;pre&amp;gt;getDirectoryName(), applicationCommand&lt;br /&gt;
NOT&lt;br /&gt;
getDirName(), appCmd&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Files ==&lt;br /&gt;
&lt;br /&gt;
All files must be named in all lower case.&lt;br /&gt;
&lt;br /&gt;
Classes and global objects should be declared in individual files with the file name matching the class/object name.&lt;br /&gt;
&amp;lt;pre&amp;gt;fckbrowserinfo.js, fcktoolbarbutton.js&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Layout  ==&lt;br /&gt;
&lt;br /&gt;
For indentation, the TAB should be used. Development IDEs should be configured to represent TABs as 4 spaces. &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( test )&lt;br /&gt;
{&lt;br /&gt;
    if ( otherTest )&lt;br /&gt;
        doSomething();&lt;br /&gt;
    doMore();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Block layout should be as illustrated. &lt;br /&gt;
&amp;lt;pre&amp;gt;while (&amp;amp;nbsp;!done )&lt;br /&gt;
{&lt;br /&gt;
    doSomething();&lt;br /&gt;
    done = moreToDo();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Single statement (single line only) if/else/while/for could (preferably) be written without brackets, but never in the same line. &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( condition )&lt;br /&gt;
    statement;&lt;br /&gt;
&lt;br /&gt;
while ( condition )&lt;br /&gt;
    statement;&lt;br /&gt;
&lt;br /&gt;
for ( initialization&amp;amp;nbsp;; condition&amp;amp;nbsp;; update )&lt;br /&gt;
    statement;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above rule is not valid for nested blocks, like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;if ( condition )&lt;br /&gt;
{&lt;br /&gt;
    if ( anotherCondition )&lt;br /&gt;
        statement;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// WRONG:&lt;br /&gt;
if ( condition )&lt;br /&gt;
    if ( anotherCondition )&lt;br /&gt;
        statement;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The incompleteness of split lines must be made obvious. &lt;br /&gt;
&amp;lt;pre&amp;gt;totalSum = a + b + c + &lt;br /&gt;
    d + e; &lt;br /&gt;
&lt;br /&gt;
method( param1, param2,&lt;br /&gt;
    param3 ); &lt;br /&gt;
&lt;br /&gt;
setText( 'Long line split' + &lt;br /&gt;
    'into two parts.' );&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Whitespace  ===&lt;br /&gt;
&amp;quot;If&amp;quot;, &amp;quot;for&amp;quot;, &amp;quot;while&amp;quot; and &amp;quot;switch&amp;quot; should be followed by a white space.&lt;br /&gt;
&amp;lt;pre&amp;gt;if ( true )&lt;br /&gt;
NOT&lt;br /&gt;
if( true )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Conventional operators should be surrounded by a space (including ternary operators). &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( i &amp;amp;gt; 3 &amp;amp;amp;&amp;amp;amp; test == 'yes' )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Commas should be followed by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;function myFunction( parm1, param2, param3 )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Semi-colons in for statements should be surrounded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;for ( var i = 0&amp;amp;nbsp;; i &amp;amp;lt; count&amp;amp;nbsp;; i++ )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Semi-colons should not be preceded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;doSomething();&lt;br /&gt;
var name = 'John';&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Colons should be surrounded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;case 100&amp;amp;nbsp;:&lt;br /&gt;
NOT&lt;br /&gt;
case 100:&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Opening parenthesis must be followed by a space and closing parenthesis must be preceded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( myVar == 1 )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
There special cases where no space is recommended. When opening parenthesis for a &amp;quot;self-executing anonymous function&amp;quot; and when closing parenthesis after an indented code block:&lt;br /&gt;
&amp;lt;pre&amp;gt;(function()&lt;br /&gt;
{&lt;br /&gt;
    // Code here&lt;br /&gt;
})();&lt;br /&gt;
&lt;br /&gt;
myMethod( function()&lt;br /&gt;
    {&lt;br /&gt;
        // Code here&lt;br /&gt;
    });&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Functions/method calls should not be followed by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;doSomething( someParameter );&lt;br /&gt;
NOT&lt;br /&gt;
doSomething ( someParameter );&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Logical units within a block should be separated by one blank line. &lt;br /&gt;
&amp;lt;pre&amp;gt;// Create a new identity matrix&lt;br /&gt;
var matrix = new Matrix4x4();&lt;br /&gt;
&lt;br /&gt;
// Precompute angles for efficiency &lt;br /&gt;
var cosAngle = mathCos( angle );&lt;br /&gt;
var sinAngle = mathSin( angle );&lt;br /&gt;
&lt;br /&gt;
// Specify matrix as a rotation transformation &lt;br /&gt;
matrix.setElement( 1, 1, cosAngle );&lt;br /&gt;
matrix.setElement( 1, 2, sinAngle ); &lt;br /&gt;
matrix.setElement( 2, 1, -sinAngle );&lt;br /&gt;
matrix.setElement( 2, 2, cosAngle );&lt;br /&gt;
&lt;br /&gt;
// Apply rotation&lt;br /&gt;
transformation.multiply( matrix );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Multiple variables declaration in a single &amp;quot;var&amp;quot; statement must be aligned with a single tab.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var example = 1,&lt;br /&gt;
    sample = 2;&lt;br /&gt;
NOT&lt;br /&gt;
var example = 1,&lt;br /&gt;
        sample = 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variables  ==&lt;br /&gt;
&lt;br /&gt;
Variables must be always defined with &amp;quot;var&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Function parameters must be in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;function sum( firstNumber, secondNumber )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Local variables must be in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;function doSomething()&lt;br /&gt;
{&lt;br /&gt;
    var colorOne = 1;&lt;br /&gt;
    var colorTwo = 2;&lt;br /&gt;
&lt;br /&gt;
    return colorOne + colorTwo;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Several variables can be defined with a single var statement, but only if their initialization values are in single lines. Do not initialize more than one variable is a single line: &lt;br /&gt;
&amp;lt;pre&amp;gt;var aVar, someVar,&lt;br /&gt;
    other1Var = 10,&lt;br /&gt;
    other2Var = 25,&lt;br /&gt;
    isVar = true;&lt;br /&gt;
&lt;br /&gt;
var longVar = function()&lt;br /&gt;
{&lt;br /&gt;
    // This var takes more than one line.&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
var objVar =&lt;br /&gt;
{&lt;br /&gt;
    // This var takes more than one line.&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Comments  ==&lt;br /&gt;
&lt;br /&gt;
Tricky code should not be commented but rewritten: In general, the use of comments should be minimized by making the code self-documenting by appropriate name choices and an explicit logical structure. &lt;br /&gt;
&lt;br /&gt;
All comments should be written in English. Whenever possible, end comments with a period as normal phrases, and wrap comments within the first 80 characters of each line. &lt;br /&gt;
&lt;br /&gt;
There should be a space after the comment identifier. &lt;br /&gt;
&amp;lt;pre&amp;gt;// This is a comment.   NOT: //This is a comment &lt;br /&gt;
/**                     NOT: /** &lt;br /&gt;
* This is block               *This is a block &lt;br /&gt;
* comment.                    *comment &lt;br /&gt;
*/                            */&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that comment blocks should be opened with two asterisks only for documentation purposes. See [[FCKeditor 3.x/Design and Architecture/Documentation#JavaScript_API|JavaScript API Documentation]].&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions ==&lt;br /&gt;
&lt;br /&gt;
The '''regular expression literal''' should be used whenever possible, instead of the RegExp object, which should be used only when the regular expression pattern is not constant or depends on runtime computation.&lt;br /&gt;
&amp;lt;pre&amp;gt;/^foo\s*/i&lt;br /&gt;
NOT&lt;br /&gt;
new RegExp( '^foo\s*', 'i' )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Other than shortnesses and better readability, regular expression literals are compiled during script evaluation, which improves performance at runtime.&lt;br /&gt;
&lt;br /&gt;
== File Headers  ==&lt;br /&gt;
&lt;br /&gt;
There are minimum requirements for us to be able to make our code available to the world. Most of them are related to legal needs, which help us protecting the project from abuses. &lt;br /&gt;
&lt;br /&gt;
Here is a JavaScript template for the header to be included in the source code: &lt;br /&gt;
&amp;lt;pre&amp;gt;/*&lt;br /&gt;
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.&lt;br /&gt;
For licensing, see LICENSE.html or http://ckeditor.com/license&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Of course, different languages have different commenting syntax, so it is enough to copy the header from an existing file to maintain the style. &lt;br /&gt;
&lt;br /&gt;
=== Author Tags  ===&lt;br /&gt;
&lt;br /&gt;
Author names, e-mails or web site addresses should be avoided in the header. To justify that, let me recall a citation from Sander Striker, a member of the Apache Software Foundation, that can be found at [http://producingoss.com/en/managing-volunteers.html#territoriality Producing Open Source Software]: &lt;br /&gt;
&amp;lt;blockquote&amp;gt;At the Apache Software foundation we discourage the use of author tags in source code. There are various reasons for this, apart from the legal ramifications. Collaborative development is about working on projects as a group and caring for the project as a group. Giving credit is good, and should be done, but in a way that does not allow for false attribution, even by implication. There is no clear line for when to add or remove an author tag. Do you add your name when you change a comment? When you put in a one-line fix? Do you remove other author tags when you refactor the code and it looks 95% different? What do you do about people who go about touching every file, changing just enough to make the virtual author tag quota, so that their name will be everywhere?&amp;lt;br&amp;gt; &amp;lt;/blockquote&amp;gt; &amp;lt;blockquote&amp;gt;&lt;br /&gt;
There are better ways to give credit, and our preference is to use those. From a technical standpoint author tags are unnecessary; if you wish to find out who wrote a particular piece of code, the version control system can be consulted to figure that out. Author tags also tend to get out of date. Do you really wish to be contacted in private about a piece of code you wrote five years ago and were glad to have forgotten?&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;/blockquote&amp;gt; &lt;br /&gt;
The SVN is a good place to understand user participation. Even when committing changes proposed by Joe White, it is nice to add a comment like &amp;quot;Thanks to Joe White.&amp;quot; in the commit message.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/Coding_Style&amp;diff=2842</id>
		<title>FCKeditor 3.x/Design and Architecture/Coding Style</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=FCKeditor_3.x/Design_and_Architecture/Coding_Style&amp;diff=2842"/>
				<updated>2010-02-02T13:21:51Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: /* Whitespace */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Coding Style Guidelines =&lt;br /&gt;
&lt;br /&gt;
These guidelines where defined based on mixed common standards mainly related to Java programming. It aims to reflect the generally accepted standards for JavaScript coding with some minor adjustments.&lt;br /&gt;
&lt;br /&gt;
It is quite common to take the Java style to write JavaScript code, assuming it is a &amp;quot;cut-down&amp;quot; version of Java. Although JavaScript has an indirect relation with Java, apart from the similar &amp;quot;C     &lt;br /&gt;
== General Recommendations  ==&lt;br /&gt;
&lt;br /&gt;
Any violation to the guide is allowed if it enhances readability. &lt;br /&gt;
&lt;br /&gt;
If the name &amp;quot;CKEditor&amp;quot; is used, if must always be written with &amp;quot;CKE&amp;quot; uppercased concatenated with &amp;quot;ditor&amp;quot; in lowercase. The following usages are wrong: &amp;quot;CKeditor&amp;quot;, &amp;quot;ckEditor&amp;quot;, &amp;quot;CK Editor&amp;quot;, etc. Exceptions are made for directories and file names, which must always be lowercased, and the CKEDITOR namespace name. &lt;br /&gt;
&lt;br /&gt;
If the name &amp;quot;FCKeditor&amp;quot; is used, it must always be written with &amp;quot;FCK&amp;quot; uppercased concatenated with &amp;quot;editor&amp;quot; in lowercase. The following are wrong: &amp;quot;FckEditor&amp;quot;, &amp;quot;FCKEditor&amp;quot;, &amp;quot;fckEditor&amp;quot;, &amp;quot;FCK Editor&amp;quot;, and so on. Exception is made for directory names, where all chars &amp;quot;should&amp;quot; be in lowercase. &lt;br /&gt;
&lt;br /&gt;
The name &amp;quot;JavaScript&amp;quot; should be written with both the &amp;quot;J&amp;quot; and &amp;quot;S&amp;quot; in uppercase. The following are wrong: &amp;quot;Javascript&amp;quot;, &amp;quot;javascript&amp;quot;, etc.&lt;br /&gt;
&lt;br /&gt;
== Naming Conventions ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Name Conventions  ===&lt;br /&gt;
&lt;br /&gt;
The ROOT namespace has a fixed name: CKEDITOR. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing namespaces must be all lowercase. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR.dom, CKEDITOR.env, CKEDITOR.ui&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing public classes and public global objects must be in PascalCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR.dom.Document, CKEDITOR.Util&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing constants must be all UPPERCASE. &lt;br /&gt;
&amp;lt;pre&amp;gt;CKEDITOR.STATUS_COMPLETE, CKEDITOR.EDITMODE_WYSIWYG, CKEDITOR.CTRL&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing public methods must be verbs and written in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;appendStyleSheet(), getElement (), setTimeout()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing public properties must be nouns and written in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;name, document, targetWindow&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing private methods must be verbs and written in camelCase prefixed with an underscore. &lt;br /&gt;
&amp;lt;pre&amp;gt;_doInternalStuff()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Names representing private properties must be nouns and written in camelCase prefixed with an underscore. &lt;br /&gt;
&amp;lt;pre&amp;gt;_internalCounter, _prefix&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Abbreviations and acronyms should not be uppercase when used as name. &lt;br /&gt;
&amp;lt;pre&amp;gt;setHtml(), XmlDocument&lt;br /&gt;
NOT&lt;br /&gt;
setHTML(), XMLDocument&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
All names should be written in English.&lt;br /&gt;
&lt;br /&gt;
=== Specific Name Conventions ===&lt;br /&gt;
&lt;br /&gt;
The prefixes &amp;quot;get&amp;quot; and &amp;quot;set&amp;quot; may be used on methods that get or set properties which require computation.&lt;br /&gt;
&amp;lt;pre&amp;gt;setArrayCount(), getFormattedValue()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The prefix &amp;quot;checkIs&amp;quot; may be used on methods which return boolean states which require computation.&lt;br /&gt;
&amp;lt;pre&amp;gt;checkIsValid(), checkIsEmpty()&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Abbreviations in names should be avoided.&lt;br /&gt;
&amp;lt;pre&amp;gt;getDirectoryName(), applicationCommand&lt;br /&gt;
NOT&lt;br /&gt;
getDirName(), appCmd&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Files ==&lt;br /&gt;
&lt;br /&gt;
All files must be named in all lower case.&lt;br /&gt;
&lt;br /&gt;
Classes and global objects should be declared in individual files with the file name matching the class/object name.&lt;br /&gt;
&amp;lt;pre&amp;gt;fckbrowserinfo.js, fcktoolbarbutton.js&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Layout  ==&lt;br /&gt;
&lt;br /&gt;
For indentation, the TAB should be used. Development IDEs should be configured to represent TABs as 4 spaces. &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( test )&lt;br /&gt;
{&lt;br /&gt;
    if ( otherTest )&lt;br /&gt;
        doSomething();&lt;br /&gt;
    doMore();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Block layout should be as illustrated. &lt;br /&gt;
&amp;lt;pre&amp;gt;while (&amp;amp;nbsp;!done )&lt;br /&gt;
{&lt;br /&gt;
    doSomething();&lt;br /&gt;
    done = moreToDo();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Single statement (single line only) if/else/while/for could (preferably) be written without brackets, but never in the same line. &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( condition )&lt;br /&gt;
    statement;&lt;br /&gt;
&lt;br /&gt;
while ( condition )&lt;br /&gt;
    statement;&lt;br /&gt;
&lt;br /&gt;
for ( initialization&amp;amp;nbsp;; condition&amp;amp;nbsp;; update )&lt;br /&gt;
    statement;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above rule is not valid for nested blocks, like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;if ( condition )&lt;br /&gt;
{&lt;br /&gt;
    if ( anotherCondition )&lt;br /&gt;
        statement;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// WRONG:&lt;br /&gt;
if ( condition )&lt;br /&gt;
    if ( anotherCondition )&lt;br /&gt;
        statement;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The incompleteness of split lines must be made obvious. &lt;br /&gt;
&amp;lt;pre&amp;gt;totalSum = a + b + c + &lt;br /&gt;
    d + e; &lt;br /&gt;
&lt;br /&gt;
method( param1, param2,&lt;br /&gt;
    param3 ); &lt;br /&gt;
&lt;br /&gt;
setText( 'Long line split' + &lt;br /&gt;
    'into two parts.' );&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Whitespace  ===&lt;br /&gt;
&amp;quot;If&amp;quot;, &amp;quot;for&amp;quot;, &amp;quot;while&amp;quot; and &amp;quot;switch&amp;quot; should be followed by a white space.&lt;br /&gt;
&amp;lt;pre&amp;gt;if ( true )&lt;br /&gt;
NOT&lt;br /&gt;
if( true )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Conventional operators should be surrounded by a space (including ternary operators). &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( i &amp;amp;gt; 3 &amp;amp;amp;&amp;amp;amp; test == 'yes' )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Commas should be followed by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;function myFunction( parm1, param2, param3 )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Semi-colons in for statements should be surrounded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;for ( var i = 0&amp;amp;nbsp;; i &amp;amp;lt; count&amp;amp;nbsp;; i++ )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Semi-colons should not be preceded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;doSomething();&lt;br /&gt;
var name = 'John';&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Colons should be surrounded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;case 100&amp;amp;nbsp;:&lt;br /&gt;
NOT&lt;br /&gt;
case 100:&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Opening parenthesis must be followed by a space and closing parenthesis must be preceded by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;if ( myVar == 1 )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
There special cases where no space is recommended. When opening parenthesis for a &amp;quot;self-executing anonymous function&amp;quot; and when closing parenthesis after an indented code block:&lt;br /&gt;
&amp;lt;pre&amp;gt;(function()&lt;br /&gt;
{&lt;br /&gt;
    // Code here&lt;br /&gt;
})();&lt;br /&gt;
&lt;br /&gt;
myMethod( function()&lt;br /&gt;
    {&lt;br /&gt;
        // Code here&lt;br /&gt;
    });&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Functions/method calls should not be followed by a space. &lt;br /&gt;
&amp;lt;pre&amp;gt;doSomething( someParameter );&lt;br /&gt;
NOT&lt;br /&gt;
doSomething ( someParameter );&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Logical units within a block should be separated by one blank line. &lt;br /&gt;
&amp;lt;pre&amp;gt;// Create a new identity matrix&lt;br /&gt;
var matrix = new Matrix4x4();&lt;br /&gt;
&lt;br /&gt;
// Precompute angles for efficiency &lt;br /&gt;
var cosAngle = mathCos( angle );&lt;br /&gt;
var sinAngle = mathSin( angle );&lt;br /&gt;
&lt;br /&gt;
// Specify matrix as a rotation transformation &lt;br /&gt;
matrix.setElement( 1, 1, cosAngle );&lt;br /&gt;
matrix.setElement( 1, 2, sinAngle ); &lt;br /&gt;
matrix.setElement( 2, 1, -sinAngle );&lt;br /&gt;
matrix.setElement( 2, 2, cosAngle );&lt;br /&gt;
&lt;br /&gt;
// Apply rotation&lt;br /&gt;
transformation.multiply( matrix );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Second line of a multiple variables declarations should have a single tab proceeded.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var example = 1,&lt;br /&gt;
     sample = 2;&lt;br /&gt;
NOT&lt;br /&gt;
var example = 1,&lt;br /&gt;
    sample = 2;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variables  ==&lt;br /&gt;
&lt;br /&gt;
Variables must be always defined with &amp;quot;var&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Function parameters must be in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;function sum( firstNumber, secondNumber )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Local variables must be in camelCase. &lt;br /&gt;
&amp;lt;pre&amp;gt;function doSomething()&lt;br /&gt;
{&lt;br /&gt;
    var colorOne = 1;&lt;br /&gt;
    var colorTwo = 2;&lt;br /&gt;
&lt;br /&gt;
    return colorOne + colorTwo;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Several variables can be defined with a single var statement, but only if their initialization values are in single lines. Do not initialize more than one variable is a single line: &lt;br /&gt;
&amp;lt;pre&amp;gt;var aVar, someVar,&lt;br /&gt;
    other1Var = 10,&lt;br /&gt;
    other2Var = 25,&lt;br /&gt;
    isVar = true;&lt;br /&gt;
&lt;br /&gt;
var longVar = function()&lt;br /&gt;
{&lt;br /&gt;
    // This var takes more than one line.&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
var objVar =&lt;br /&gt;
{&lt;br /&gt;
    // This var takes more than one line.&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Comments  ==&lt;br /&gt;
&lt;br /&gt;
Tricky code should not be commented but rewritten: In general, the use of comments should be minimized by making the code self-documenting by appropriate name choices and an explicit logical structure. &lt;br /&gt;
&lt;br /&gt;
All comments should be written in English. Whenever possible, end comments with a period as normal phrases, and wrap comments within the first 80 characters of each line. &lt;br /&gt;
&lt;br /&gt;
There should be a space after the comment identifier. &lt;br /&gt;
&amp;lt;pre&amp;gt;// This is a comment.   NOT: //This is a comment &lt;br /&gt;
/**                     NOT: /** &lt;br /&gt;
* This is block               *This is a block &lt;br /&gt;
* comment.                    *comment &lt;br /&gt;
*/                            */&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Note that comment blocks should be opened with two asterisks only for documentation purposes. See [[FCKeditor 3.x/Design and Architecture/Documentation#JavaScript_API|JavaScript API Documentation]].&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions ==&lt;br /&gt;
&lt;br /&gt;
The '''regular expression literal''' should be used whenever possible, instead of the RegExp object, which should be used only when the regular expression pattern is not constant or depends on runtime computation.&lt;br /&gt;
&amp;lt;pre&amp;gt;/^foo\s*/i&lt;br /&gt;
NOT&lt;br /&gt;
new RegExp( '^foo\s*', 'i' )&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Other than shortnesses and better readability, regular expression literals are compiled during script evaluation, which improves performance at runtime.&lt;br /&gt;
&lt;br /&gt;
== File Headers  ==&lt;br /&gt;
&lt;br /&gt;
There are minimum requirements for us to be able to make our code available to the world. Most of them are related to legal needs, which help us protecting the project from abuses. &lt;br /&gt;
&lt;br /&gt;
Here is a JavaScript template for the header to be included in the source code: &lt;br /&gt;
&amp;lt;pre&amp;gt;/*&lt;br /&gt;
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.&lt;br /&gt;
For licensing, see LICENSE.html or http://ckeditor.com/license&lt;br /&gt;
*/&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Of course, different languages have different commenting syntax, so it is enough to copy the header from an existing file to maintain the style. &lt;br /&gt;
&lt;br /&gt;
=== Author Tags  ===&lt;br /&gt;
&lt;br /&gt;
Author names, e-mails or web site addresses should be avoided in the header. To justify that, let me recall a citation from Sander Striker, a member of the Apache Software Foundation, that can be found at [http://producingoss.com/en/managing-volunteers.html#territoriality Producing Open Source Software]: &lt;br /&gt;
&amp;lt;blockquote&amp;gt;At the Apache Software foundation we discourage the use of author tags in source code. There are various reasons for this, apart from the legal ramifications. Collaborative development is about working on projects as a group and caring for the project as a group. Giving credit is good, and should be done, but in a way that does not allow for false attribution, even by implication. There is no clear line for when to add or remove an author tag. Do you add your name when you change a comment? When you put in a one-line fix? Do you remove other author tags when you refactor the code and it looks 95% different? What do you do about people who go about touching every file, changing just enough to make the virtual author tag quota, so that their name will be everywhere?&amp;lt;br&amp;gt; &amp;lt;/blockquote&amp;gt; &amp;lt;blockquote&amp;gt;&lt;br /&gt;
There are better ways to give credit, and our preference is to use those. From a technical standpoint author tags are unnecessary; if you wish to find out who wrote a particular piece of code, the version control system can be consulted to figure that out. Author tags also tend to get out of date. Do you really wish to be contacted in private about a piece of code you wrote five years ago and were glad to have forgotten?&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;/blockquote&amp;gt; &lt;br /&gt;
The SVN is a good place to understand user participation. Even when committing changes proposed by Joe White, it is nice to add a comment like &amp;quot;Thanks to Joe White.&amp;quot; in the commit message.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide/jQuery_Adapter&amp;diff=2835</id>
		<title>CKEditor 3.x/Developers Guide/jQuery Adapter</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide/jQuery_Adapter&amp;diff=2835"/>
				<updated>2010-01-19T17:42:09Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CKEditor offers native jQuery integration through its jQuery Adapter (a jQuery plugin basically). It provides deep integration of CKEditor into jQuery, using its native features.&lt;br /&gt;
&lt;br /&gt;
== Creating editor instances ==&lt;br /&gt;
&lt;br /&gt;
To create editor instances, other than the usual CKEditor core script, you need to load the jQuery Adapter file in the page, in the following order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source language=&amp;quot;html&amp;quot;&amp;gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;/ckeditor/ckeditor.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;/ckeditor/adapters/jquery.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point, any textarea, p or div element can be transformed into a rich text editor by simply using the ckeditor() method:&lt;br /&gt;
&amp;lt;source language=&amp;quot;js&amp;quot;&amp;gt;$( 'textarea.editor' ).ckeditor();&amp;lt;/source&amp;gt;&lt;br /&gt;
jQuery chaining can also be used:&lt;br /&gt;
&amp;lt;source language=&amp;quot;js&amp;quot;&amp;gt;$( '.section-x' )&lt;br /&gt;
    .find( 'textarea.editor' )&lt;br /&gt;
        .ckeditor()&lt;br /&gt;
    .end()&lt;br /&gt;
    .find( 'a' )&lt;br /&gt;
        .addClass( 'mylink' )&lt;br /&gt;
    .end();&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ckeditor() is the main method in the jQuery adapter. It accepts two optional parameters:&lt;br /&gt;
 * A '''callback function''' to be execute when the editor is ready.&lt;br /&gt;
 * '''Configuration options''' specific to the created editor instance.&lt;br /&gt;
&lt;br /&gt;
The [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html configurations options] are passed through a simple object containing properties, each one related to a specific editor setting.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;source language=&amp;quot;js&amp;quot;&amp;gt;$('.jquery_ckeditor')&lt;br /&gt;
    .ckeditor( function() { /* callback code */ }, { skin : 'office2003' } );&lt;br /&gt;
    .ckeditor( callback2 );&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Code above won't create 2 editors - it will discover that one is already during creation and wait with the second callback. Each of those callbacks will be executed in context of the [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html CKEDITOR.editor] object (so &amp;quot;this&amp;quot; will be the editor) and the DOM element object will be passed as parameter.&lt;br /&gt;
&lt;br /&gt;
== Code interaction with editor instances== &lt;br /&gt;
As soon as an editor instance is ready (after the above callback call), the ckeditorGet() method can then be used to retrieve a [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html CKEDITOR.editor] object that represents an editor instance. For example:&lt;br /&gt;
&amp;lt;source language=&amp;quot;js&amp;quot;&amp;gt;var editor = $('.jquery_ckeditor').ckeditorGet();&lt;br /&gt;
alert( editor.checkDirty() );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because setting and retrieving the editor data is a common operation, the jQuery Adapter also provides the dedicated val() method:&lt;br /&gt;
&amp;lt;source language=&amp;quot;js&amp;quot;&amp;gt;// Get the editor data.&lt;br /&gt;
var data = $( 'textarea.editor' ).val();&lt;br /&gt;
// Set the editor data.&lt;br /&gt;
$( 'textarea.editor' ).val( 'my new content' );&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This feature can be disabled by setting CKEDITOR.config.jqueryOverrideVal to false, before loading the adapter code.&lt;br /&gt;
&lt;br /&gt;
For textareas, the editor will automatically return it's content back to the form when it is submitted. CKEditor also works with the official [http://jquery.malsup.com/form/ jQuery Form Plugin] for AJAX based forms. It doesn't require anything from the developer side.&lt;br /&gt;
&lt;br /&gt;
== Events handling ==&lt;br /&gt;
Although CKEditor uses its own event system, there are four main events which we're exposing to the jQuery event system. All events use the event namespace, which is simply named &amp;amp;quot;.ckeditor&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The following events are available:&lt;br /&gt;
 * &amp;lt;strong&amp;gt;instanceReady.ckeditor&amp;lt;/strong&amp;gt;: fired when the editor is created, but before any callback being passed to the ckeditor() method.&lt;br /&gt;
 * &amp;lt;strong&amp;gt;setData.ckeditor&amp;lt;/strong&amp;gt;: fired when data is set into the editor.&lt;br /&gt;
 * &amp;lt;strong&amp;gt;getData.ckeditor&amp;lt;/strong&amp;gt;: fired when data is fetched from the editor. The current editor data is also passed in the arguments.&lt;br /&gt;
 * &amp;lt;strong&amp;gt;destroy.ckeditor&amp;lt;/strong&amp;gt;: fired when the editor gets destroyed. It can be used, for example, to execute some cleanup on the page.&lt;br /&gt;
&lt;br /&gt;
The editor instance is always passed as the first data argument for the listener. Both getData and setData are often used internally so listening to them should be done with care.&lt;br /&gt;
&lt;br /&gt;
jQuery events DO bubble up through the DOM, so they can be listened selectively on certain parts of the document.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide/Integration/jQuery_Adapter&amp;diff=2834</id>
		<title>CKEditor 3.x/Developers Guide/Integration/jQuery Adapter</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide/Integration/jQuery_Adapter&amp;diff=2834"/>
				<updated>2010-01-19T17:39:11Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: moved CKEditor 3.x/Developers Guide/Integration/jQuery Adapter to CKEditor 3.x/Developers Guide/jQuery Adapter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[CKEditor 3.x/Developers Guide/jQuery Adapter]]&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide/jQuery_Adapter&amp;diff=2833</id>
		<title>CKEditor 3.x/Developers Guide/jQuery Adapter</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide/jQuery_Adapter&amp;diff=2833"/>
				<updated>2010-01-19T17:39:11Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: moved CKEditor 3.x/Developers Guide/Integration/jQuery Adapter to CKEditor 3.x/Developers Guide/jQuery Adapter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The CKEditor jQuery Adapter provides deep integration into the jQuery JavaScript Library of the CKEditor, using native library's features.&lt;br /&gt;
&lt;br /&gt;
== Creating editor instances ==&lt;br /&gt;
To create editor instances, other than the usual CKEditor core script, you need to load the jQuery Adapter file in the page, in the following order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source language=&amp;quot;html&amp;quot;&amp;gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;/ckeditor/ckeditor.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;/ckeditor/adapters/jquery.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point, any textarea, p or div element can be transformed into a rich text editor by simply using the ckeditor() method:&lt;br /&gt;
&amp;lt;source language=&amp;quot;js&amp;quot;&amp;gt;$( 'textarea.editor' ).ckeditor();&amp;lt;/source&amp;gt;&lt;br /&gt;
jQuery chaining can also be used:&lt;br /&gt;
&amp;lt;source language=&amp;quot;js&amp;quot;&amp;gt;$( '.section-x' )&lt;br /&gt;
    .find( 'textarea.editor' )&lt;br /&gt;
        .ckeditor()&lt;br /&gt;
    .end()&lt;br /&gt;
    .find( 'a' )&lt;br /&gt;
        .addClass( 'mylink' )&lt;br /&gt;
    .end();&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ckeditor() is the main method in the jQuery adapter. It accepts two optional parameters:&lt;br /&gt;
 * A '''callback function''' to be execute when the editor is ready.&lt;br /&gt;
 * '''Configuration options''' specific to the created editor instance.&lt;br /&gt;
&lt;br /&gt;
The [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html configurations options] are passed through a simple object containing properties, each one related to a specific editor setting.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;source language=&amp;quot;js&amp;quot;&amp;gt;$('.jquery_ckeditor')&lt;br /&gt;
    .ckeditor( function() { /* callback code */ }, { skin : 'office2003' } );&lt;br /&gt;
    .ckeditor( callback2 );&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Code above won't create 2 editors - it will discover that one is already during creation and wait with the second callback. Each of those callbacks will be executed in context of the [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html CKEDITOR.editor] object (so &amp;quot;this&amp;quot; will be the editor) and the DOM element object will be passed as parameter.&lt;br /&gt;
&lt;br /&gt;
== Code interaction with editor instances== &lt;br /&gt;
As soon as an editor instance is ready (after the above callback call), the ckeditorGet() method can then be used to retrieve a [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html CKEDITOR.editor] object that represents an editor instance. For example:&lt;br /&gt;
&amp;lt;source language=&amp;quot;js&amp;quot;&amp;gt;var editor = $('.jquery_ckeditor').ckeditorGet();&lt;br /&gt;
alert( editor.checkDirty() );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because setting and retrieving the editor data is a common operation, the jQuery Adapter also provides the dedicated val() method:&lt;br /&gt;
&amp;lt;source language=&amp;quot;js&amp;quot;&amp;gt;// Get the editor data.&lt;br /&gt;
var data = $( 'textarea.editor' ).val();&lt;br /&gt;
// Set the editor data.&lt;br /&gt;
$( 'textarea.editor' ).val( 'my new content' );&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This feature can be disabled by setting CKEDITOR.config.jqueryOverrideVal to false, before loading the adapter code.&lt;br /&gt;
&lt;br /&gt;
For textareas, the editor will automatically return it's content back to the form when it is submitted. CKEditor also works with the official [http://jquery.malsup.com/form/ jQuery Form Plugin] for AJAX based forms. It doesn't require anything from the developer side.&lt;br /&gt;
&lt;br /&gt;
== Events handling ==&lt;br /&gt;
Although CKEditor uses its own event system, there are four main events which we're exposing to the jQuery event system. All events use the event namespace, which is simply named &amp;amp;quot;.ckeditor&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The following events are available:&lt;br /&gt;
 * &amp;lt;strong&amp;gt;instanceReady.ckeditor&amp;lt;/strong&amp;gt;: fired when the editor is created, but before any callback being passed to the ckeditor() method.&lt;br /&gt;
 * &amp;lt;strong&amp;gt;setData.ckeditor&amp;lt;/strong&amp;gt;: fired when data is set into the editor.&lt;br /&gt;
 * &amp;lt;strong&amp;gt;getData.ckeditor&amp;lt;/strong&amp;gt;: fired when data is fetched from the editor. The current editor data is also passed in the arguments.&lt;br /&gt;
 * &amp;lt;strong&amp;gt;destroy.ckeditor&amp;lt;/strong&amp;gt;: fired when the editor gets destroyed. It can be used, for example, to execute some cleanup on the page.&lt;br /&gt;
&lt;br /&gt;
The editor instance is always passed as the first data argument for the listener. Both getData and setData are often used internally so listening to them should be done with care.&lt;br /&gt;
&lt;br /&gt;
jQuery events DO bubble up through the DOM, so they can be listened selectively on certain parts of the document.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide&amp;diff=2832</id>
		<title>CKEditor 3.x/Developers Guide</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide&amp;diff=2832"/>
				<updated>2010-01-19T17:38:47Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:CKEditor 3.x - Developer's Guide}} &lt;br /&gt;
&lt;br /&gt;
*[[CKEditor 3.x/Developers Guide/Installation|Installation]] &lt;br /&gt;
* Integration&lt;br /&gt;
**[[CKEditor 3.x/Developers Guide/Integration|Integration]] &lt;br /&gt;
** [[CKEditor 3.x/Developers Guide/jQuery Adapter|jQuery]]&lt;br /&gt;
*Configuration &lt;br /&gt;
**[[CKEditor 3.x/Developers Guide/Setting Configurations|Setting Configurations]] &lt;br /&gt;
**[[CKEditor 3.x/Developers Guide/Toolbar|Toolbar]] &lt;br /&gt;
**[[CKEditor_3.x/Developers_Guide/Styles|Styles]] &lt;br /&gt;
**[[CKEditor 3.x/Developers Guide/Output Formatting|Output Formatting]] &lt;br /&gt;
**[[CKEditor 3.x/Developers Guide/Templates|Templates]]&lt;br /&gt;
**Spell Checker &lt;br /&gt;
**[[CKEditor 3.x/Developers Guide/File Browser (Uploader)|File Browser/Uploader ]] &lt;br /&gt;
*Customization &lt;br /&gt;
**Plugins &lt;br /&gt;
**Skins &lt;br /&gt;
*Advanced Tasks&lt;br /&gt;
**[[CKEditor_3.x/Developers_Guide/Editor_Core_URLs_Manipulation|Editor Core URLs Manipulation]]&lt;br /&gt;
*Deployment &lt;br /&gt;
*[http://docs.cksource.com/ckeditor_api/ JavaScript API] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture|Design and Architecture]]&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide&amp;diff=2788</id>
		<title>CKEditor 3.x/Developers Guide</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide&amp;diff=2788"/>
				<updated>2010-01-16T14:10:36Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#CUSTOMTITLE:CKEditor 3.x - Developer's Guide}} &lt;br /&gt;
&lt;br /&gt;
*[[CKEditor 3.x/Developers Guide/Installation|Installation]] &lt;br /&gt;
*[[CKEditor 3.x/Developers Guide/Integration|Integration]] &lt;br /&gt;
*Configuration &lt;br /&gt;
**[[CKEditor 3.x/Developers Guide/Setting Configurations|Setting Configurations]] &lt;br /&gt;
**[[CKEditor 3.x/Developers Guide/Toolbar|Toolbar]] &lt;br /&gt;
**[[CKEditor_3.x/Developers_Guide/Styles|Styles]] &lt;br /&gt;
**[[CKEditor 3.x/Developers Guide/Output Formatting|Output Formatting]] &lt;br /&gt;
**[[CKEditor 3.x/Developers Guide/Templates|Templates]]&lt;br /&gt;
**Spell Checker &lt;br /&gt;
**[[CKEditor 3.x/Developers Guide/File Browser (Uploader)|File Browser/Uploader ]] &lt;br /&gt;
*Customization &lt;br /&gt;
**Plugins &lt;br /&gt;
**Skins &lt;br /&gt;
*Advanced Tasks&lt;br /&gt;
**[[CKEditor_3.x/Developers_Guide/Editor_Core_URLs_Manipulation|Editor Core URLs Manipulation]]&lt;br /&gt;
*Deployment &lt;br /&gt;
*[http://docs.cksource.com/ckeditor_api/ JavaScript API] &lt;br /&gt;
*[[FCKeditor 3.x/Design and Architecture|Design and Architecture]]&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide/Editor_Core_URLs_Manipulation&amp;diff=2787</id>
		<title>CKEditor 3.x/Developers Guide/Editor Core URLs Manipulation</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide/Editor_Core_URLs_Manipulation&amp;diff=2787"/>
				<updated>2010-01-16T14:06:26Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Created page with 'CKEditor has been built with customization and flexibility in mind. These aspects have also being considered for its most basic aspects, like its installation files location, whi…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CKEditor has been built with customization and flexibility in mind. These aspects have also being considered for its most basic aspects, like its installation files location, which can be also fully customized.&lt;br /&gt;
&lt;br /&gt;
== The Files Loaded from the Server ==&lt;br /&gt;
&lt;br /&gt;
To create editor instances in a page, developers must [[CKEditor_3.x/Developers_Guide/Integration|include the ckeditor.js file]] into it. This file contains the core code of the editor. It creates editors in the page, and automatically loads all necessary files to make them run. The following is a list of files that are generally loaded:&lt;br /&gt;
&lt;br /&gt;
* Configurations file.&lt;br /&gt;
* Skin files, which include CSS and eventually JavaScript.&lt;br /&gt;
* Language files.&lt;br /&gt;
* Plugin files.&lt;br /&gt;
* Dialog files.&lt;br /&gt;
* etc...&lt;br /&gt;
&lt;br /&gt;
In a standard installation, not all the above files are loaded and all of them are located inside the CKEditor installation folder. Other installations may load files from other folders also, depending on the configurations and customizations.&lt;br /&gt;
&lt;br /&gt;
While the path and the file name of some of the editor files are customizable (like [[CKEditor_3.x/Developers_Guide/Setting_Configurations|configuration files]]), others are quite standard and fixed. For example, the English language files will always come from the &amp;quot;lang&amp;quot; folder, with file name en.js, while the main skins file for the Kama skin comes from &amp;quot;skins/kama/editor.css&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Understanding the Files Loading ==&lt;br /&gt;
&lt;br /&gt;
By default, the editor core code uses the [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.html#.getUrl CKEDITOR.getUrl] function to load files. This function transforms editor relative paths into full URLs pointing to resources in the server. Additionally, it appends the editor timestamp to the URL querystring, providing the anti-cache feature.&lt;br /&gt;
&lt;br /&gt;
For example, calling CKEDITOR.getUrl('lang/en.js') returns &amp;quot;&amp;lt;nowiki&amp;gt;http://www.example.com/ckeditor/lang/en.js?t=A067&amp;lt;/nowiki&amp;gt;&amp;quot;, if using CKEditor 3.1, installed in the &amp;quot;/ckeditor&amp;quot; folder of the www.example.com web site.&lt;br /&gt;
&lt;br /&gt;
== Manipulating URLs ==&lt;br /&gt;
&lt;br /&gt;
CKEditor offers a simple way to manipulate the results of the CKEDITOR.getUrl function. It's enough to define a global '''CKEDITOR_GETURL''' function in the page. This function will be called by CKEDITOR.getUrl. If anything is returned from it, it will be used as the resolved URL, otherwise the default resolution procedure is used.&lt;br /&gt;
&lt;br /&gt;
For example, the following function sends all language file requests to a PHP script, passing the language code to it. The script could then take the language file code from a database:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function CKEDITOR_GETURL( resource )&lt;br /&gt;
{&lt;br /&gt;
	var match = resource.match( /lang\/([a-z\-]+)\.js$/ );&lt;br /&gt;
	if ( match )&lt;br /&gt;
		return '/getlang.php?lang=' + match[ 1 ];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;/ckeditor/ckeditor.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, only the language files will be resolved by our function. All other files will have pass though the default resolution process.&lt;br /&gt;
&lt;br /&gt;
Note that '''the CKEDITOR_GETURL function must be defined before the ckeditor.js loading''', otherwise it will be ignored. The above code can be included at the top of the ckeditor.js file also.&lt;br /&gt;
&lt;br /&gt;
== Usage Cases ==&lt;br /&gt;
&lt;br /&gt;
There are several cases that may benefit from this feature. Here we have a list of few of them:&lt;br /&gt;
&lt;br /&gt;
* Point editor core files to be loaded from different directories with different names. For example having the English language file coming from &amp;quot;/mylangfiles/lang_en.js&amp;quot;.&lt;br /&gt;
* Having all editor files being served by a server process (like loading from the database), instead of having them physically installed.&lt;br /&gt;
* Some server applications may avoid directories structures. For example, we could have the English language files renamed to &amp;quot;lang_en.js&amp;quot; and a skin file to &amp;quot;skin_kama_editor.css&amp;quot; (all slashes replaced by underscores).&lt;br /&gt;
* etc...&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide/Templates&amp;diff=2769</id>
		<title>CKEditor 3.x/Developers Guide/Templates</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKEditor_3.x/Developers_Guide/Templates&amp;diff=2769"/>
				<updated>2009-12-30T16:08:28Z</updated>
		
		<summary type="html">&lt;p&gt;Fredck: Created page with 'With CKEditor, content writers can select a template from a list by clicking the &amp;quot;Templates&amp;quot; button in the toolbar. A template is a predefined piece of HTML that is placed inside…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;With CKEditor, content writers can select a template from a list by clicking the &amp;quot;Templates&amp;quot; button in the toolbar. A template is a predefined piece of HTML that is placed inside the editor. In this way the user doesn't need to start writing from scratch. Designers can prepare well designed templates, avoiding user errors before they happen.&lt;br /&gt;
&lt;br /&gt;
=== Template Definition Files ===&lt;br /&gt;
&lt;br /&gt;
The editor comes with three sample templates that are there just to show the way it works. They are defined into the &amp;quot;plugins/templates/templates/default.js&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
Developers should definitely change the default templates as they are not especially useful to end users.&lt;br /&gt;
&lt;br /&gt;
Note that a template definition file is a JavaScript file that's loaded when opening the templates dialog for the first time. This file may be changed to include custom templates, or even better, you can create a separated template file outside the editor installation directory, configuring the editor to use it.&lt;br /&gt;
&lt;br /&gt;
=== Pointing the Editor to a Custom Templates Definitions File ===&lt;br /&gt;
&lt;br /&gt;
Assuming you have created a custom Templates Definitions file named &amp;quot;mytemplates.js&amp;quot; (starting from a copy of default.js) and have placed it into the root of your web site. Now, just add the following setting in the editor configuration:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
config.templates_files = [ '/mytemplates.js' ];&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Note that the [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.templates_files templates_files] setting is an array, which means that more than one templates file can be used.&lt;br /&gt;
&lt;br /&gt;
=== The Templates Definitions File Contents ===&lt;br /&gt;
&lt;br /&gt;
This is a sample Template Definition file that defines two simple templates:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Register a templates definition set named &amp;quot;default&amp;quot;.&lt;br /&gt;
CKEDITOR.addTemplates( 'default',&lt;br /&gt;
{&lt;br /&gt;
	// The name of sub folder which hold the shortcut preview images of the templates.&lt;br /&gt;
	imagesPath : CKEDITOR.getUrl( CKEDITOR.plugins.getPath( 'templates' ) + 'templates/images/' ),&lt;br /&gt;
&lt;br /&gt;
	// The templates definitions.&lt;br /&gt;
	templates :&lt;br /&gt;
		[&lt;br /&gt;
			{&lt;br /&gt;
				title: 'My Template 1',&lt;br /&gt;
				image: 'template1.gif',&lt;br /&gt;
				description: 'Description of my template 1.',&lt;br /&gt;
				html:&lt;br /&gt;
					'&amp;lt;h2&amp;gt;Template 1&amp;lt;/h2&amp;gt;' +&lt;br /&gt;
					'&amp;lt;p&amp;gt;&amp;lt;img scr=&amp;quot;/logo.png&amp;quot; style=&amp;quot;float:left&amp;quot; /&amp;gt;Type the text here.&amp;lt;/p&amp;gt;'&lt;br /&gt;
			},&lt;br /&gt;
			{&lt;br /&gt;
				title: 'My Template 2',&lt;br /&gt;
				html:&lt;br /&gt;
					'&amp;lt;h3&amp;gt;Template 2&amp;lt;/h3&amp;gt;' +&lt;br /&gt;
					'&amp;lt;p&amp;gt;Type the text here.&amp;lt;/p&amp;gt;'&lt;br /&gt;
			}&lt;br /&gt;
		]&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see here, the above is pure JavaScript code. It's a simple call to the [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.html#.addTemplates CKEDITOR.addTemplates] function, which registers the templates under a unique name (&amp;quot;default&amp;quot;). This name can be then used by the [http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.templates templates] setting.&lt;/div&gt;</summary>
		<author><name>Fredck</name></author>	</entry>

	</feed>