JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.2.2
[ckeditor.git] / _source / core / tools.js
index fc82904..8055566 100644 (file)
@@ -12,6 +12,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 {\r
        var functions = [];\r
 \r
+       CKEDITOR.on( 'reset', function()\r
+               {\r
+                       functions = [];\r
+               });\r
+\r
        /**\r
         * Utility functions.\r
         * @namespace\r
@@ -255,7 +260,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                } )(),\r
 \r
                /**\r
-                * Build the HTML snippet of a set of <style>/<link>.\r
+                * Build the HTML snippet of a set of &lt;style>/&lt;link>.\r
                 * @param css {String|Array} Each of which are url (absolute) of a CSS file or\r
                 * a trunk of style text.\r
                 */\r
@@ -691,6 +696,18 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                catch (e) {}\r
                        }\r
                        return returnValue;\r
+               },\r
+\r
+               /**\r
+                * Generate a combined key from a series of params.\r
+                * @param {String} subKey One or more string used as sub keys.\r
+                * @example\r
+                * var key = CKEDITOR.tools.genKey( 'key1', 'key2', 'key3' );\r
+                * alert( key );                // "key1-key2-key3".\r
+                */\r
+               genKey : function()\r
+               {\r
+                       return Array.prototype.slice.call( arguments ).join( '-' );\r
                }\r
        };\r
 })();\r