-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
55 lines (48 loc) · 1.48 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
51
52
53
54
55
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GrapesJS S3 images editor</title>
<link href="https://unpkg.com/grapesjs/dist/css/grapes.min.css" rel="stylesheet">
<link href="dist/grapesjs-plugin-s3.css" rel="stylesheet">
<script src="https://unpkg.com/grapesjs"></script>
<script src="dist/grapesjs-plugin-s3.min.js"></script>
<style>
body, html{ height: 100%; margin: 0;}
</style>
</head>
<body>
<div id="gjs" style="height:0px; overflow:hidden">
<img style="margin: 18% 0 0 45%" src="http://artf.github.io/grapesjs/img/grapesjs-logo.png" />
</div>
<script type="text/javascript">
var host = 'http://artf.github.io/grapesjs/';
var images = [
host + 'img/grapesjs-logo.png',
host + 'img/tmp-blocks.jpg',
host + 'img/tmp-tgl-images.jpg',
host + 'img/tmp-send-test.jpg',
host + 'img/tmp-devices.jpg',
];
var editor = grapesjs.init({
height: '100%',
noticeOnUnload: 0,
storageManager: { autoload: 0 },
assetManager: { assets: images },
container: '#gjs',
fromElement: true,
plugins: ['gjs-plugin-s3'],
pluginsOpts: {
'gjs-plugin-s3': {
imgFormats: ["png", "jpeg", "jpg"],
bucketName: "bodylesscms",
prefix: "content/img/",
accessKeyId: '<AWS Access key Id>',
secretAccessKey: '<Aws secret access key>',
sessionToken: '<AWS Sessions Token>'
}
}
});
</script>
</body>
</html>