JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4b
[ckeditor.git] / _source / core / tools.js
index 9407fd7..a1bff9a 100644 (file)
@@ -377,6 +377,20 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                })(),\r
 \r
                /**\r
+                * Gets a unique ID for CKEditor's interface elements. It returns a\r
+                * string with the "cke_" prefix and a progressive number.\r
+                * @function\r
+                * @returns {String} A unique ID.\r
+                * @example\r
+                * alert( CKEDITOR.tools.<b>getNextId()</b> );  // "cke_1" (e.g.)\r
+                * alert( CKEDITOR.tools.<b>getNextId()</b> );  // "cke_2"\r
+                */\r
+               getNextId : function()\r
+               {\r
+                       return 'cke_' + this.getNextNumber();\r
+               },\r
+\r
+               /**\r
                 * Creates a function override.\r
                 * @param {Function} originalFunction The function to be overridden.\r
                 * @param {Function} functionBuilder A function that returns the new\r