JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.5
[ckeditor.git] / _source / core / tools.js
index 9407fd7..cd46ba4 100644 (file)
@@ -346,19 +346,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                },\r
 \r
                /**\r
-                * Replace characters can't be represented through CSS Selectors string\r
-                * by CSS Escape Notation where the character escape sequence consists\r
-                * of a backslash character (\) followed by the orginal characters.\r
-                * Ref: http://www.w3.org/TR/css3-selectors/#grammar\r
-                * @param cssSelectText\r
-                * @return the escaped selector text.\r
-                */\r
-               escapeCssSelector : function( cssSelectText )\r
-               {\r
-                       return cssSelectText.replace( /[\s#:.,$*^\[\]()~=+>]/g, '\\$&' );\r
-               },\r
-\r
-               /**\r
                 * Gets a unique number for this CKEDITOR execution session. It returns\r
                 * progressive numbers starting at 1.\r
                 * @function\r
@@ -377,6 +364,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
@@ -637,7 +638,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                {\r
                        return functions.push( function()\r
                                {\r
-                                       fn.apply( scope || this, arguments );\r
+                                       return fn.apply( scope || this, arguments );\r
                                }) - 1;\r
                },\r
 \r