How Do I Learn the Names of CKEditor Dialog Window Fields?

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

(Title updated)
(Minor correction)
Line 2: Line 2:
 
If you want to customize a [[CKEditor_3.x/Users_Guide/Interface/Dialog_Windows|dialog window]], check the source code of a plugin that creates it (e.g. <code>_source/''pluginName''/dialogs/''pluginDialog''.js</code>).
 
If you want to customize a [[CKEditor_3.x/Users_Guide/Interface/Dialog_Windows|dialog window]], check the source code of a plugin that creates it (e.g. <code>_source/''pluginName''/dialogs/''pluginDialog''.js</code>).
  
The <code>[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.dialogDefinition.html#contents contents]</code> entry defines a dialog window tab. Each UI element (text field, checkbox, button, etc.) is defined using the <code>[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.contentDefinition.html#elements elements]</code> array.
+
The <code>[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.dialogDefinition.html#contents contents]</code> entry defines a dialog window tab (page). Each UI element (text field, checkbox, button, etc.) is defined using the <code>[http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.contentDefinition.html#elements elements]</code> array. The identifiers that can be used in code in order to refer to the dialog window fields can be found in the <code>id</code> parameters.  
  
Below is an example of a dialog window tab entitled First Tab that contains a text field and a checkbox.
+
Below is an example of a dialog window tab entitled '''First Tab''' that contains a text field and a checkbox.
 
<source lang="javascript">
 
<source lang="javascript">
 
contents :
 
contents :

Revision as of 15:06, 7 March 2011

If you want to customize a dialog window, check the source code of a plugin that creates it (e.g. _source/pluginName/dialogs/pluginDialog.js).

The contents entry defines a dialog window tab (page). Each UI element (text field, checkbox, button, etc.) is defined using the elements array. The identifiers that can be used in code in order to refer to the dialog window fields can be found in the id parameters.

Below is an example of a dialog window tab entitled First Tab that contains a text field and a checkbox.

contents :
[
	{
		id : 'tab1',
		label : 'First Tab',
		title : 'First Tab Title',
		accessKey : 'Q',
		elements :
		[
			{
				type : 'text',
				id : 'sampleText1',
				label : 'Sample Text 1',
				'default' : 'Hello world!'
			},
			{
				type : 'checkbox',
				id : 'sampleCheckbox',
				label : 'This checkbox is selected by default',
				'default' : true
			}
		]
	}
]