-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtinymce.html
More file actions
91 lines (88 loc) · 4.12 KB
/
tinymce.html
File metadata and controls
91 lines (88 loc) · 4.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script>
<script src="vendor/jstree/jquery.jstree.js"></script>
<script src="vendor/purl.js"></script>
<script src="vendor/jquery.scrollintoview.js"></script>
<!-- <script src="/sarissa-full-0.9.9.6/gr/abiss/js/sarissa/sarissa.js"></script> -->
<script src="/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script src="vendor/require.js"></script>
<link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/themes/base/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" href="lib/editor.css"/>
</head>
<body>
<form id="mainform" action="post_test.php" method="post">
<div style="width: 100%;">
<div class="treewrapper">
<div id="editortree">
</div>
</div>
<div style="float: right; width: 69%;">
<textarea style="width: 100%;" id='editor1' name='editor1'></textarea>
</div>
<div style="clear: both;"></div>
<div style="width: 80%;" id="editorvalidation"></div>
</div>
<p>
<!-- <input type="submit" value="Submit" /> -->
</p>
</form>
<ul class="filenames">
<li>/ncbi-updates/from-client/PMC2780816kipling.xml</li>
<li>/ncbi-updates/from-client/PMC3153123kipling.xml</li>
<li>/ncbi-updates/from-client/PMC3256938kipling.xml</li>
<li>test/xml/short-kipling.xml</li>
</ul>
Data file: <input type="text" id="datafile" name="datafile"/> <input type="button" name="loaddata" id="loaddata" value="load"/>
<br/>
<input type="button" name="savedata" id="savedata" value="save"/>
<script>
$('#datafile').val($().url().param('s'));
</script>
<script src="lib/require-config.js"></script>
<script>
require( ["textorum/tinymce/plugin", "jqueryui-popups", "tinymce-jquery", "tinymce-jquery-adapter", "textorum/tinymce/demobindings"], function() {
tinymce.init({
mode: 'exact',
theme: 'advanced',
elements: 'editor1',
plugins: '-textorum,-jqueryinlinepopups,fullscreen,save',
entity_encoding: 'raw',
content_css: 'lib/plugin.css',
theme_advanced_buttons1 : "save,fullscreen,undo,redo,help,code,visualaid,visualchars,visualblocks,|,txt_validate_attrs,txt_validate_noattrs",
theme_advanced_buttons2 : "|,bold,italic,underline,sup,sub,|", //cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "", //tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "", //insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,visualblocks",
// Map formats to kipling
formats: {
bold : {inline : 'span', 'classes' : 'bold', 'attributes' : { 'data-xmlel' : 'bold' } },
italic : {inline : 'span', 'classes' : 'italic', 'attributes' : { 'data-xmlel' : 'italic' } },
underline : {inline : 'span', 'classes' : 'underline', exact : true, 'attributes' : { 'data-xmlel' : 'underline' } },
pre : { inline : 'code', 'attributes' : { 'data-xmlel' : 'monospace' } },
sup : { inline : 'sup', 'attributes' : { 'data-xmlel' : 'sup' } },
sub : { inline : 'sub', 'attributes' : { 'data-xmlel' : 'sub' } }
},
keep_styles: false,
theme_advanced_resizing: true,
theme_advanced_resize_horizontal: false,
preformatted: true,
whitespace_elements: 'pre script noscript style textarea div span code',
apply_source_formatting: false,
valid_elements: "*[*]",
setup: function(ed) {
ed.onInit.add(function(ed) {
if ($('#datafile').val()) {
$('#loaddata').click();
}
});
}
});
});
</script>
</body>
</html>