2008-09-24 23:44:34 +00:00
|
|
|
<!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">
|
|
|
|
<head>
|
2012-10-30 08:10:29 +00:00
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
2010-10-09 08:04:25 +00:00
|
|
|
<link type="text/css" rel="stylesheet" href="css/note-ui.css"/>
|
2010-10-09 17:21:25 +00:00
|
|
|
<script type="text/javascript;version=1.8" src="tiny_mce.js"></script>
|
|
|
|
<script type="text/javascript;version=1.8">
|
2008-09-24 23:44:34 +00:00
|
|
|
tinyMCE.init({
|
|
|
|
// General options
|
2009-06-01 08:23:16 +00:00
|
|
|
body_id : "zotero-tinymce-note",
|
2008-10-13 19:51:53 +00:00
|
|
|
mode : "none",
|
2008-09-24 23:44:34 +00:00
|
|
|
theme : "advanced",
|
2010-10-09 08:04:25 +00:00
|
|
|
content_css : "css/note-content.css",
|
2008-10-13 19:51:53 +00:00
|
|
|
button_tile_map : true,
|
|
|
|
language : "en", // TODO: localize
|
2011-03-29 00:40:11 +00:00
|
|
|
entities : "160,nbsp",
|
2013-08-09 15:44:34 +00:00
|
|
|
gecko_spellcheck : true,
|
2013-06-28 19:26:23 +00:00
|
|
|
convert_urls : false,
|
2008-10-13 19:51:53 +00:00
|
|
|
|
|
|
|
handle_event_callback : function (event) {
|
2010-10-09 18:03:03 +00:00
|
|
|
zoteroHandleEvent(event);
|
2008-10-13 19:51:53 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
onchange_callback : function () {
|
2012-10-30 08:10:29 +00:00
|
|
|
zoteroHandleEvent({ type: 'change' });
|
2008-10-13 19:51:53 +00:00
|
|
|
},
|
|
|
|
|
2010-10-09 17:21:25 +00:00
|
|
|
setup : function (ed) {
|
2013-03-05 22:51:30 +00:00
|
|
|
// Set text direction
|
|
|
|
var dir = window.location.href.match(/dir=(ltr|rtl)/)[1];
|
|
|
|
ed.settings.directionality = dir;
|
|
|
|
// Include button for opposite direction, to function as a toggle
|
|
|
|
ed.settings.theme_advanced_buttons1 = ed.settings.theme_advanced_buttons1.replace(
|
|
|
|
"%DIR%",
|
|
|
|
"," + dir.split("").reverse().join("")
|
|
|
|
);
|
|
|
|
|
2012-10-30 08:10:29 +00:00
|
|
|
ed.onInit.add(function (ed) {
|
|
|
|
zoteroInit(ed);
|
|
|
|
});
|
|
|
|
|
2015-03-17 19:14:17 +00:00
|
|
|
["Cut", "Copy", "Paste"].forEach(function (command) {
|
2010-10-09 17:21:25 +00:00
|
|
|
let cmd = command;
|
|
|
|
ed.addCommand(command, function (ui, value) {
|
|
|
|
zoteroExecCommand(ed.getDoc(), cmd, ui, value);
|
|
|
|
});
|
2015-03-17 19:14:17 +00:00
|
|
|
});
|
2010-10-09 17:21:25 +00:00
|
|
|
},
|
|
|
|
|
2008-10-13 19:51:53 +00:00
|
|
|
fix_list_elements : true,
|
|
|
|
fix_table_elements : true,
|
2014-02-03 13:03:36 +00:00
|
|
|
plugins : "paste,contextmenu,linksmenu,directionality,autolink",
|
2008-10-13 19:51:53 +00:00
|
|
|
|
2008-09-24 23:44:34 +00:00
|
|
|
// Theme options
|
2014-02-03 13:03:36 +00:00
|
|
|
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,sub,sup,|,forecolor,backcolor,|,blockquote,|,link,|,%DIR%",
|
2008-10-14 03:02:26 +00:00
|
|
|
theme_advanced_buttons2 : "formatselect,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,outdent,indent,|,removeformat,code",
|
|
|
|
theme_advanced_buttons3 : "",
|
2008-09-24 23:44:34 +00:00
|
|
|
theme_advanced_toolbar_location : "top",
|
2010-10-08 06:44:33 +00:00
|
|
|
theme_advanced_toolbar_align : "left",
|
2012-10-30 08:10:29 +00:00
|
|
|
theme_advanced_statusbar_location : "none",
|
2010-10-08 06:44:33 +00:00
|
|
|
|
|
|
|
// More restrictive version of default set, with JS/etc. removed
|
2010-10-08 07:54:44 +00:00
|
|
|
valid_elements : "@[id|class|style|title|dir<ltr?rtl|lang|xml::lang],"
|
2010-10-08 06:44:33 +00:00
|
|
|
+ "a[rel|rev|charset|hreflang|tabindex|accesskey|type|"
|
|
|
|
+ "name|href|target|title|class],strong/b,em/i,strike,u,"
|
|
|
|
+ "#p,-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|"
|
|
|
|
+ "src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,"
|
2011-04-13 09:25:19 +00:00
|
|
|
+ "-blockquote[cite],-table[border=0|cellspacing|cellpadding|width|frame|rules|"
|
2010-10-08 06:44:33 +00:00
|
|
|
+ "height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|"
|
|
|
|
+ "height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,"
|
|
|
|
+ "#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor"
|
|
|
|
+ "|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,"
|
|
|
|
+ "-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face"
|
|
|
|
+ "|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],"
|
2010-11-09 21:06:57 +00:00
|
|
|
+ "object[classid|width|height|codebase|type],param[name|value|_value],"
|
2010-10-08 06:44:33 +00:00
|
|
|
+ "map[name],area[shape|coords|href|alt|target],bdo,"
|
|
|
|
+ "button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|"
|
|
|
|
+ "valign|width],dfn,fieldset,"
|
|
|
|
+ "kbd,label[for],legend,optgroup[label|disabled],option[disabled|label|selected|value],"
|
|
|
|
+ "q[cite],samp,select[disabled|multiple|name|size],small,"
|
2010-10-08 07:54:44 +00:00
|
|
|
+ "textarea[cols|rows|disabled|name|readonly],tt,var,big"
|
2008-09-24 23:44:34 +00:00
|
|
|
});
|
2008-10-13 19:51:53 +00:00
|
|
|
tinyMCE.execCommand("mceAddControl", true, "tinymce");
|
2008-09-24 23:44:34 +00:00
|
|
|
</script>
|
2011-02-13 06:16:06 +00:00
|
|
|
<style>
|
|
|
|
table.mceLayout {
|
|
|
|
border-left: 0 !important;
|
|
|
|
border-right: 0 !important;
|
|
|
|
border-top: 0 !important;
|
|
|
|
}
|
|
|
|
</style>
|
2008-09-24 23:44:34 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2013-04-09 08:14:48 +00:00
|
|
|
<div id="tinymce"></div>
|
2008-09-24 23:44:34 +00:00
|
|
|
</body>
|
|
|
|
</html>
|