to customize CKEditor dialog windows without changing the original editor code.
The following customizations are being done in the example below:
</p>
<p>
For details on how to create this setup check the source code of this sample page.
</p>
</div>
<p>A custom dialog is added to the editors using the <code>pluginsLoaded</code> event, from an external <atarget="_blank"href="assets/my_dialog.js">dialog definition file</a>:</p>
<ol>
<li><strong>Creating a custom dialog window</strong>– "My Dialog" dialog window opened with the "My Dialog" toolbar button.</li>
<li><strong>Creating a custom button</strong>– Add button to open the dialog with "My Dialog" toolbar button.</li>
</ol>
<textareacols="80"id="editor1"name="editor1"rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
<script>
// Replace the <textareaid="editor1"> with an CKEditor instance.
CKEDITOR.replace( 'editor1', config );
</script>
<p>The below editor modify the dialog definition of the above added dialog using the <code>dialogDefinition</code> event:</p>
<ol>
<li><strong>Adding dialog tab</strong>– Add new tab "My Tab" to dialog window.</li>
<li><strong>Removing a dialog window tab</strong>– Remove "Second Tab" page from the dialog window.</li>
<li><strong>Adding dialog window fields</strong>– Add "My Custom Field" to the dialog window.</li>
<li><strong>Removing dialog window field</strong>– Remove "Select Field" selection field from the dialog window.</li>
<li><strong>Setting default values for dialog window fields</strong>– Set default value of "Text Field" text field. </li>
<li><strong>Setup initial focus for dialog window</strong>– Put initial focus on "My Custom Field" text field. </li>
</ol>
<textareacols="80"id="editor2"name="editor2"rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
<script>
// Replace the <textareaid="editor1"> with an CKEditor instance.
CKEDITOR.replace( 'editor2', config );
</script>
<divid="footer">
<hr>
<p>
CKEditor - The text editor for the Internet - <aclass="samples"href="http://ckeditor.com/">http://ckeditor.com</a>