I've tested a Javascript on JSFiddle for a localStorage-working textarea. Once I make the HTML page and load it up, it doesn't use the Javascript written.
Here's my HTML code:
<html>
<head>
<title>Page Title</title>
<script type='text/javascript' src='http://code.jquery.com/jquery-1.4.2.js'></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.js"></script>
<script type='text/javascript'>
jQuery(function($) {
var editor = document.querySelector("#editor");
if (window.localStorage["TextEditorData"]) {
editor.value = window.localStorage["TextEditorData"];
}
editor.addEventListener("keyup", function() {
window.localStorage["TextEditorData"] = editor.value;
});
</script>
</head>
<body onLoad=".ready()">
<textarea id="editor"></textarea>
</body>
</html>
What did I miss? Testing it on JSFiddle works correctly.