comparison static/js/tiny_mce/plugins/autosave/editor_plugin_src.js @ 442:6c182ceb7147

Fixing #217; upgrade TinyMCE to 3.4.2 and enable the paste plugin.
author Brian Neal <bgneal@gmail.com>
date Thu, 26 May 2011 00:43:49 +0000
parents 88b2b9cb8c1f
children
comparison
equal deleted inserted replaced
441:33d0c55e57a9 442:6c182ceb7147
255 setItem : function(key, value) { 255 setItem : function(key, value) {
256 var userDataElement = ed.getElement(); 256 var userDataElement = ed.getElement();
257 257
258 userDataElement.setAttribute(key, value); 258 userDataElement.setAttribute(key, value);
259 userDataElement.expires = self.getExpDate(); 259 userDataElement.expires = self.getExpDate();
260 userDataElement.save("TinyMCE"); 260
261 try {
262 userDataElement.save("TinyMCE");
263 } catch (e) {
264 // Ignore, saving might fail if "Userdata Persistence" is disabled in IE
265 }
261 }, 266 },
262 267
263 getItem : function(key) { 268 getItem : function(key) {
264 var userDataElement = ed.getElement(); 269 var userDataElement = ed.getElement();
265 270
266 userDataElement.load("TinyMCE"); 271 try {
267 272 userDataElement.load("TinyMCE");
268 return userDataElement.getAttribute(key); 273 return userDataElement.getAttribute(key);
274 } catch (e) {
275 // Ignore, loading might fail if "Userdata Persistence" is disabled in IE
276 return null;
277 }
269 }, 278 },
270 279
271 removeItem : function(key) { 280 removeItem : function(key) {
272 ed.getElement().removeAttribute(key); 281 ed.getElement().removeAttribute(key);
273 } 282 }