-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.php
More file actions
84 lines (72 loc) · 2.36 KB
/
example.php
File metadata and controls
84 lines (72 loc) · 2.36 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
<?php
/**
* Created by PhpStorm.
* User: gary
* Date: 2017/11/17
* Time: 21:58
* /data/htdocs/packagist/storage/images
*/
require_once __DIR__ . '/vendor/autoload.php';
use Garyvv\WebCreator\WeChatCreator;
use Garyvv\WebCreator\TmallCreator;
if (isset($_POST['content'])) {
// $web = new WeChatCreator($_POST['content']);
$web = new TmallCreator($_POST['content']);
$web->dealImage('dir', 'imgServer');
// 传OSS
$oss['bucket'] = '';
$oss['view_domain'] = '';
$oss['end_point'] = '';
$oss['bucket_prefix'] = '';
$oss['app_id'] = '';
$oss['app_secret'] = '';
$web->setOss($oss);
$web->uploadImageToOss();
$web->uploadHtmlToOss('text.html');
var_dump($web->link);
}
?>
<!DOCTYPE html>
<html>
<head>
<title>富文本框HTML生成器</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
* {
margin: 0;
padding: 0;
}
ul, ol {
list-style: none;
}
body {
font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}
</style>
</head>
<body text=#000000 bgColor="#ffffff">
<header>
<h1>富文本框HTML生成器</h1>
</header>
<form id="edit-content" action="" method="POST" style="padding: 3%;">
<label for="redactor_content">内容</label>
<textarea id="redactor_content" name="content" style="height: 560px;"></textarea>
<hr>
<button style="width: 70px;height: 35px; margin-top: 10px;background-color: #fff" type="submit">提交修改</button>
<br>
<br>
</form>
</body>
<link rel="stylesheet" href="http://simditor.tower.im/assets/styles/simditor.css">
<script type="text/javascript" src="http://simditor.tower.im/assets/scripts/jquery.min.js"></script>
<script type="text/javascript" src="http://simditor.tower.im/assets/scripts/mobilecheck.js"></script>
<script type="text/javascript" src="http://simditor.tower.im/assets/scripts/module.js"></script>
<script type="text/javascript" src="http://simditor.tower.im/assets/scripts/hotkeys.js"></script>
<script type="text/javascript" src="http://simditor.tower.im/assets/scripts/uploader.js"></script>
<script type="text/javascript" src="http://simditor.tower.im/assets/scripts/simditor.js"></script>
<script>
var editor = new Simditor({
textarea: $('#redactor_content')
});
</script>
</html>