X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_samples%2Fapi_dialog.html;h=af6f2a712813987a0563ad4c42443a69812c3c22;hb=a272c66d841421f8bf933c16535bdcde1c4649fc;hp=262062578bc44eb317b34bc053a51a39e3405fab;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6;p=ckeditor.git diff --git a/_samples/api_dialog.html b/_samples/api_dialog.html index 2620625..af6f2a7 100644 --- a/_samples/api_dialog.html +++ b/_samples/api_dialog.html @@ -1,11 +1,11 @@ - Using API to customize dialogs - CKEditor Sample + Using API to Customize Dialog Windows — CKEditor Sample @@ -87,6 +87,13 @@ CKEDITOR.on( 'dialogDefinition', function( ev ) } ] }); + + // Rewrite the 'onFocus' handler to always focus 'url' field. + dialogDefinition.onFocus = function() + { + var urlField = this.getContentElement( 'info', 'url' ); + urlField.select(); + }; } }); @@ -95,9 +102,32 @@ CKEDITOR.on( 'dialogDefinition', function( ev ) -

- CKEditor Sample +

+ CKEditor Sample — Using CKEditor Dialog API

+
+

+ This sample shows how to use the + CKEditor Dialog API + to customize CKEditor dialog windows without changing the original editor code. + The following customizations are being done in the example below: +

+
    +
  1. Adding dialog window tabs – "My Tab" in the "Link" dialog window.
  2. +
  3. Removing a dialog window tab – "Target" tab from the "Link" dialog window.
  4. +
  5. Adding dialog window fields – "My Custom Field" in the "Link" dialog window.
  6. +
  7. Removing dialog window fields – "Link Type" and "Browse Server" in the "Link" + dialog window.
  8. +
  9. Setting default values for dialog window fields – "URL" field in the + "Link" dialog window.
  10. +
  11. Creating a custom dialog window – "My Dialog" dialog window opened with the "My Dialog" toolbar button.
  12. +
+

+For details on how to create this setup check the source code of this sample page. +

+
+ +
-

- This sample shows how to use the dialog API to customize dialogs whithout changing - the original editor code. The following customizations are being done::

-
    -
  1. Add dialog pages ("My Tab" in the Link dialog).
  2. -
  3. Remove a dialog tab ("Target" tab from the Link dialog).
  4. -
  5. Add dialog fields ("My Custom Field" into the Link dialog).
  6. -
  7. Remove dialog fields ("Link Type" and "Browser Server" the Link - dialog).
  8. -
  9. Set default values for dialog fields (for the "URL" field in the - Link dialog).
  10. -
  11. Create a custom dialog ("My Dialog" button).
  12. -