Fix newlines in note HTML files
This commit is contained in:
parent
6d1946ee0a
commit
6ec2f9aaf9
|
@ -1,47 +1,47 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<style>
|
<style>
|
||||||
html, body {
|
html, body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tinymce_parent {
|
#tinymce_parent {
|
||||||
display: block;
|
display: block;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 130px;
|
min-height: 130px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#noScriptWarning {
|
#noScriptWarning {
|
||||||
padding: 10px 8px 4px;
|
padding: 10px 8px 4px;
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script type="text/javascript" src="tinymce.js"></script>
|
<script type="text/javascript" src="tinymce.js"></script>
|
||||||
<script type="text/javascript" src="locale.js"></script>
|
<script type="text/javascript" src="locale.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
tinyMCE.init({
|
tinyMCE.init({
|
||||||
content_css: "css/integration-content.css",
|
content_css: "css/integration-content.css",
|
||||||
|
|
||||||
toolbar: "bold italic underline | sub sup | removeformat",
|
toolbar: "bold italic underline | sub sup | removeformat",
|
||||||
toolbar_items_size: 'small',
|
toolbar_items_size: 'small',
|
||||||
menubar: false,
|
menubar: false,
|
||||||
resize: false,
|
resize: false,
|
||||||
statusbar: false,
|
statusbar: false,
|
||||||
|
|
||||||
init_instance_callback: function (ed) {
|
init_instance_callback: function (ed) {
|
||||||
setLocale(ed);
|
setLocale(ed);
|
||||||
zoteroInit(ed);
|
zoteroInit(ed);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
tinyMCE.execCommand("mceAddEditor", true, "tinymce");
|
tinyMCE.execCommand("mceAddEditor", true, "tinymce");
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="tinymce"></div>
|
<div id="tinymce"></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,86 +1,87 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<link type="text/css" rel="stylesheet" href="css/note-ui.css"/>
|
<link type="text/css" rel="stylesheet" href="css/note-ui.css"/>
|
||||||
<script type="text/javascript" src="tinymce.js"></script>
|
<script type="text/javascript" src="tinymce.js"></script>
|
||||||
<script type="text/javascript" src="locale.js"></script>
|
<script type="text/javascript" src="locale.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
tinymce.init({
|
tinymce.init({
|
||||||
body_id: "zotero-tinymce-note",
|
body_id: "zotero-tinymce-note",
|
||||||
content_css: "css/note-content.css",
|
content_css: "css/note-content.css",
|
||||||
entities: "160,nbsp",
|
entities: "160,nbsp",
|
||||||
browser_spellcheck: true,
|
|
||||||
convert_urls: false,
|
browser_spellcheck: true,
|
||||||
fix_list_elements: true,
|
convert_urls: false,
|
||||||
|
fix_list_elements: true,
|
||||||
plugins: "autolink,code,contextmenu,directionality,link,lists,paste,searchreplace",
|
|
||||||
|
plugins: "autolink,code,contextmenu,directionality,link,lists,paste,searchreplace",
|
||||||
toolbar1: "bold italic underline strikethrough | subscript superscript | forecolor backcolor | blockquote link | %DIR% | removeformat",
|
|
||||||
toolbar2: "formatselect | alignleft aligncenter alignright | bullist numlist outdent indent | searchreplace",
|
toolbar1: "bold italic underline strikethrough | subscript superscript | forecolor backcolor | blockquote link | %DIR% | removeformat",
|
||||||
toolbar_items_size: 'small',
|
toolbar2: "formatselect | alignleft aligncenter alignright | bullist numlist outdent indent | searchreplace",
|
||||||
menubar: false,
|
toolbar_items_size: 'small',
|
||||||
resize: false,
|
menubar: false,
|
||||||
statusbar: false,
|
resize: false,
|
||||||
|
statusbar: false,
|
||||||
contextmenu: "link | code",
|
|
||||||
|
contextmenu: "link | code",
|
||||||
link_context_toolbar: true,
|
|
||||||
link_assume_external_targets: true,
|
link_context_toolbar: true,
|
||||||
|
link_assume_external_targets: true,
|
||||||
setup: function (ed) {
|
|
||||||
setLocale(ed);
|
setup: function (ed) {
|
||||||
|
setLocale(ed);
|
||||||
// Set text direction
|
|
||||||
var dir = window.location.href.match(/dir=(ltr|rtl)/)[1];
|
// Set text direction
|
||||||
ed.settings.directionality = dir;
|
var dir = window.location.href.match(/dir=(ltr|rtl)/)[1];
|
||||||
// Include button for opposite direction, to function as a toggle
|
ed.settings.directionality = dir;
|
||||||
ed.settings.toolbar1 = ed.settings.toolbar1.replace(
|
// Include button for opposite direction, to function as a toggle
|
||||||
"%DIR%",
|
ed.settings.toolbar1 = ed.settings.toolbar1.replace(
|
||||||
dir.split("").reverse().join("")
|
"%DIR%",
|
||||||
);
|
dir.split("").reverse().join("")
|
||||||
},
|
);
|
||||||
|
},
|
||||||
init_instance_callback: function (ed) {
|
|
||||||
zoteroInit(ed);
|
init_instance_callback: function (ed) {
|
||||||
|
zoteroInit(ed);
|
||||||
['Change', 'KeyDown', 'KeyPress', 'Undo', 'Redo'].forEach(eventName =>
|
|
||||||
ed.on(eventName, event => zoteroHandleEvent(event))
|
['Change', 'KeyDown', 'KeyPress', 'Undo', 'Redo'].forEach(eventName =>
|
||||||
);
|
ed.on(eventName, event => zoteroHandleEvent(event))
|
||||||
|
);
|
||||||
["Cut", "Copy", "Paste"].forEach(function (command) {
|
|
||||||
let cmd = command;
|
["Cut", "Copy", "Paste"].forEach(function (command) {
|
||||||
ed.addCommand(command, function (ui, value) {
|
let cmd = command;
|
||||||
zoteroExecCommand(ed.getDoc(), cmd, ui, value);
|
ed.addCommand(command, function (ui, value) {
|
||||||
});
|
zoteroExecCommand(ed.getDoc(), cmd, ui, value);
|
||||||
});
|
});
|
||||||
},
|
});
|
||||||
|
},
|
||||||
// More restrictive version of default set, with JS/etc. removed
|
|
||||||
valid_elements: "@[id|class|style|title|dir<ltr?rtl|lang|xml::lang],"
|
// More restrictive version of default set, with JS/etc. removed
|
||||||
+ "a[rel|rev|charset|hreflang|tabindex|accesskey|type|"
|
valid_elements: "@[id|class|style|title|dir<ltr?rtl|lang|xml::lang],"
|
||||||
+ "name|href|target|title|class],strong/b,em/i,strike,u,"
|
+ "a[rel|rev|charset|hreflang|tabindex|accesskey|type|"
|
||||||
+ "#p,-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|"
|
+ "name|href|target|title|class],strong/b,em/i,strike,u,"
|
||||||
+ "src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,"
|
+ "#p,-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|"
|
||||||
+ "-blockquote[cite],-table[border=0|cellspacing|cellpadding|width|frame|rules|"
|
+ "src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,"
|
||||||
+ "height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|"
|
+ "-blockquote[cite],-table[border=0|cellspacing|cellpadding|width|frame|rules|"
|
||||||
+ "height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,"
|
+ "height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|"
|
||||||
+ "#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor"
|
+ "height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,"
|
||||||
+ "|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,"
|
+ "#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor"
|
||||||
+ "-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face"
|
+ "|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,"
|
||||||
+ "|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],"
|
+ "-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face"
|
||||||
+ "object[classid|width|height|codebase|type],param[name|value|_value],"
|
+ "|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],"
|
||||||
+ "map[name],area[shape|coords|href|alt|target],bdo,"
|
+ "object[classid|width|height|codebase|type],param[name|value|_value],"
|
||||||
+ "button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|"
|
+ "map[name],area[shape|coords|href|alt|target],bdo,"
|
||||||
+ "valign|width],dfn,fieldset,"
|
+ "button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|"
|
||||||
+ "kbd,label[for],legend,optgroup[label|disabled],option[disabled|label|selected|value],"
|
+ "valign|width],dfn,fieldset,"
|
||||||
+ "q[cite],samp,select[disabled|multiple|name|size],small,"
|
+ "kbd,label[for],legend,optgroup[label|disabled],option[disabled|label|selected|value],"
|
||||||
+ "textarea[cols|rows|disabled|name|readonly],tt,var,big"
|
+ "q[cite],samp,select[disabled|multiple|name|size],small,"
|
||||||
});
|
+ "textarea[cols|rows|disabled|name|readonly],tt,var,big"
|
||||||
tinymce.execCommand("mceAddEditor", true, "tinymce");
|
});
|
||||||
</script>
|
tinymce.execCommand("mceAddEditor", true, "tinymce");
|
||||||
</head>
|
</script>
|
||||||
<body>
|
</head>
|
||||||
<div id="tinymce"></div>
|
<body>
|
||||||
</body>
|
<div id="tinymce"></div>
|
||||||
</html>
|
</body>
|
||||||
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user