TinyMCE:API/tinymce.util.Cookie
From Moxiecode Documentation Wiki
[edit]
Class: tinymce.util.Cookie (static)
This class contains simple cookie management functions. All methods in this class are static so you call them without making an instance of the Cookie class.
[edit]
Methods
- get
- Gets the raw data of a cookie by name.
- getHash
- Parses the specified query string into an name/value object.
- remove
- Removes/deletes a cookie by name.
- set
- Sets a raw cookie string.
- setHash
- Sets a hashtable name/value object to a cookie.
[edit]
Examples
// Gets a cookie from the browser
console.debug(tinymce.util.Cookie.get('mycookie'));
// Gets a hash table cookie from the browser and takes out the x parameter from it
console.debug(tinymce.util.Cookie.getHash('mycookie').x);
// Sets a hash table cookie to the browser
tinymce.util.Cookie.setHash({x : '1', y : '2'});
