-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
50 lines (48 loc) · 2.44 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<!-- jQuery and jQuery-UI -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.min.css"/>
<!-- elFinder (load latest nightly for this demo) -->
<script type="text/javascript" src="https://studio-42.github.io/elFinder/demo/js/elfinder.min.js" defer="defer"></script>
<!-- tinyMCE -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/5.2.0/tinymce.min.js"></script>
<!-- tinymceElfinder -->
<script type="text/javascript" src="https://nao-pon.github.io/tinymceElfinder/tinymceElfinder.js"></script>
<script type="text/javascript">
(function() {
// make instance
const mceElf = new tinymceElfinder({
// connector URL (Use elFinder Demo site's connector for this demo)
url: 'https://hypweb.net/elFinder-nightly/demo/2.1/php/connector.minimal.php',
// upload target folder hash for this tinyMCE
uploadTargetHash: 'l3_TUNFX0ltZ3M', // l3 MCE_Imgs on elFinder Demo site for this demo
// elFinder dialog node id
nodeId: 'elfinder'
});
// TinyMCE init
tinymce.init({
selector: "#mytextarea",
height : 400,
plugins: "image, link, media, imagetools",
relative_urls: false,
remove_script_host: false,
toolbar: "undo redo | styleselect | link image media",
file_picker_callback : mceElf.browser,
images_upload_handler: mceElf.uploadHandler,
imagetools_cors_hosts: ['hypweb.net'] // set CORS for this demo
});
})();
</script>
<title>TinyMCE 5.x + elFinder Integration</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
</head>
<body>
<h1>TinyMCE 5.x + elFinder Integration</h1>
<form method="post">
<textarea id="mytextarea"><p>This TinyMCE editor is fully integrated with the elFinder file manager.</p><p>You can upload images on TinyMCE upload dialog and save the result of image editing on TinyMCE to elFinder.</p></textarea>
</form>
</body>
</html>