Mercurial > public > sg101
diff 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 |
line wrap: on
line diff
--- a/static/js/tiny_mce/plugins/autosave/editor_plugin_src.js Wed May 25 02:39:08 2011 +0000 +++ b/static/js/tiny_mce/plugins/autosave/editor_plugin_src.js Thu May 26 00:43:49 2011 +0000 @@ -257,15 +257,24 @@ userDataElement.setAttribute(key, value); userDataElement.expires = self.getExpDate(); - userDataElement.save("TinyMCE"); + + try { + userDataElement.save("TinyMCE"); + } catch (e) { + // Ignore, saving might fail if "Userdata Persistence" is disabled in IE + } }, getItem : function(key) { var userDataElement = ed.getElement(); - userDataElement.load("TinyMCE"); - - return userDataElement.getAttribute(key); + try { + userDataElement.load("TinyMCE"); + return userDataElement.getAttribute(key); + } catch (e) { + // Ignore, loading might fail if "Userdata Persistence" is disabled in IE + return null; + } }, removeItem : function(key) {