Fix for <div> appearing in some notes instead of <p>

https://forums.zotero.org/discussion/28781/

Not totally sure how/when this was happening. To fix existing notes,
switch the Format to Paragraph manually.
This commit is contained in:
Dan Stillman 2013-04-09 04:14:48 -04:00
parent f3bb679ebe
commit cc7360dc0c
4 changed files with 9 additions and 5 deletions

View file

@ -375,13 +375,17 @@
if (!SJOW.tinyMCE) {
var exts = Zotero.getInstalledExtensions(function(exts) {
for each(var ext in exts) {
if (ext.indexOf('NoScript') != -1) {
var warning = win.document.getElementById('noScriptWarning');
if (ext.indexOf('NoScript') != -1 && ext.indexOf('disabled') == -1) {
var doc = win.document;
var div = doc.getElementById('tinymce');
var warning = doc.createElement('div');
warning.id = 'noScriptWarning';
var str = "The NoScript extension is preventing Zotero "
+ "from displaying notes. To use NoScript and Zotero together, "
+ "whitelist the 'file:' scheme in the NoScript preferences "
+ "and restart " + Zotero.appName + ".";
warning.appendChild(document.createTextNode(str));
div.appendChild(warning);
break;
}
}

View file

@ -51,6 +51,6 @@ html, body {
</script>
</head>
<body>
<div id="tinymce"><div id="noScriptWarning"/></div>
<div id="tinymce"></div>
</body>
</html>

View file

@ -91,6 +91,6 @@ table.mceLayout {
</style>
</head>
<body>
<div id="tinymce"><div id="noScriptWarning"/></div>
<div id="tinymce"></div>
</body>
</html>

View file

@ -68,6 +68,6 @@ table.mceLayout > tbody > tr.mceLast {
</script>
</head>
<body>
<div id="tinymce"><div id="noScriptWarning"/></div>
<div id="tinymce"></div>
</body>
</html>