-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
56 lines (51 loc) · 1.33 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
56
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>GrapesJS Preset Webpage</title>
<link href="./css/grapes.min.css" rel="stylesheet">
<link href="./dist/grapesjs-preset-webpage.min.css" rel="stylesheet">
<script src="./js/filestack-0.1.10.js"></script>
<script src="./js/grapes.min.js"></script>
<script src="http://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
<script src="./dist/grapesjs-preset-webpage.min.js"></script>
<style>
body,
html {
height: 100%;
margin: 0;
}
</style>
</head>
<body>
<div id="gjs" style="height:0px; overflow:hidden">
</div>
<script type="text/javascript">
let uploadapi = "./api.php?action=upload";
let saveapi = "./api.php?action=save";
let loadapi = "./api.php?action=load";
var editor = grapesjs.init({
assetManager: {
upload: uploadapi,
},
storageManager: {
type:"remote",
autosave: false,
urlStore:saveapi,
urlLoad:loadapi,
},
height: '100%',
showOffsets: 1,
noticeOnUnload: 0,
container: '#gjs',
fromElement: true,
plugins: ['gjs-preset-webpage'],
pluginsOpts: {
'gjs-preset-webpage': {}
}
});
editor.StorageManager.saveapi = saveapi;
editor.StorageManager.loadapi = loadapi;
</script>
</body>
</html>