-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
132 lines (127 loc) · 5.42 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
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE html>
<html lang="ko" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<title></title>
<script src="assets/js/jquery-3.4.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="assets/js/jquery.ui.touch-punch.js"></script>
<script type="text/javascript" src="assets/js/hammer.min.js"></script>
<link rel="stylesheet" href="assets/css/jquery.mobile-1.4.5.min.css"/>
<link rel="stylesheet" href="assets/css/AprilEditor.css" />
<script type="text/javascript" src="assets/js/config.js"></script>
<script type="text/javascript" src="assets/js/AprilEditor.js"></script>
</head>
<body>
<div id="AprilEditor">
<!-- <div id="dimmed">
</div>
<div id="list_area">
</div>
<div id="input_content">
<img src="/AprilEditor/assets/imgs/drawable/ic_editor_menu.svg">
</div>
<div id="input_how">
<img id="editor_txt" src="/AprilEditor/assets/imgs/drawable/ic_editor_text_big.svg">
<p class="div_line">
</p>
<img id="editor_img" src="/AprilEditor/assets/imgs/drawable/ic_editor_img_big.svg">
<p class="div_line">
</p>
<img id="editor_link" src="/AprilEditor/assets/imgs/drawable/ic_editor_link_big.svg">
</div>
<input id="img_input" type="file" multiple="multiple" accept="image/*">
<div id="editor_page" style="position: fixed; z-index: 999; top: 0; background: #f6f6f6; width: 100vw; height: 100%; display: none;">
<div style="background: white; height: 52px;">
<img id="backImg" src="/AprilEditor/assets/imgs/drawable/ic_back_blue.svg" style="width: 4%; height: 20px; margin-top: 16px; margin-left: 5%;">
</div>
<div id="text_area" contenteditable="true">
</div>
<div id="text_style_controll">
<div class="data_normal">
<img id="font_color" class="black" src="/AprilEditor/assets/imgs/drawable/ic_editor_color_black.svg" style="padding-right: 20px;">
<img id="font_size" class="regular" src="/AprilEditor/assets/imgs/drawable/ic_editor_font_regular.svg" style="padding-right: 20px;">
<img id="font_bold" src="/AprilEditor/assets/imgs/drawable/ic_editor.svg" style="padding-right: 20px;">
</div>
<div class="data_color">
<img class="back" src="/AprilEditor/assets/imgs/drawable/ic_editor_back_copy_2.svg" style="padding-right: 5px;">
<img id="black" onclick="changeColor('black')" src="/AprilEditor/assets/imgs/drawable/ic_editor_color_black.svg" style="padding-right: 5px;">
<img id="red" onclick="changeColor('red')" src="/AprilEditor/assets/imgs/drawable/ic_editor_color_red.svg" style="padding-right: 5px;">
<img id="blue" onclick="changeColor('blue')" src="/AprilEditor/assets/imgs/drawable/ic_editor_color_blue.svg" style="padding-right: 5px;">
</div>
<div class="data_textSize ds_no">
<img class="back" src="/AprilEditor/assets/imgs/drawable/ic_editor_back_copy_2.svg" style="padding-right: 5px;">
<img onclick="changeSize('small')" src="/AprilEditor/assets/imgs/drawable/ic_editor_font_small_copy.svg" style="padding-right: 5px;">
<img onclick="changeSize('regular')" src="/AprilEditor/assets/imgs/drawable/ic_editor_font_regular_copy.svg" style="padding-right: 5px;">
<img onclick="changeSize('big')" src="/AprilEditor/assets/imgs/drawable/ic_editor_font_big_copy.svg" style="padding-right: 5px;">
</div>
<img src="/AprilEditor/assets/imgs/drawable/ic_editor_done_copy_3.svg" id="editor_success">
</div>
</div>
<div id="popup_link">
<div class="popup_header">
가져올 동영상이나 사이트의 주소
</div>
<div class="popup_content">
<input id="url_input" type="url" placeholder="https://"/>
</div>
<div class="controll_btns fs_0_8">
<span class="cancel mr_30">취소</span>
<span id="submit" class="mr_30">제출</span>
</div>
-->
</div>
<script>
// 에디터 이벤트 감지
document.addEventListener("insertEditing", function (e) {
console.log(e);
var JsonArray = new Array();
var aa = {
"type": "image",
"width": '', // image width
"height": '', // image height
"data": "loca file"
}
JsonArray.push(aa);
var link = {
"type": "link",
"data": 'string', // url
"metadata": {
"title": 'string',
"site_name": 'string',
"description": 'string',
"thumbnail": 'string',
"url": 'string'
}
}
e.callback.success(JsonArray);
}, false);
$("#test").on("click", function() {
var editor = new AprilEditor();
console.log(editor.getItems());
var JsonArray = new Array();
var aa = {
"type": "image",
"width": '', // image width
"height": '', // image height
"data": "loca file"
}
JsonArray.push(aa);
var link = {
"type": "link",
"data": 'string', // url
"metadata": {
"title": 'string',
"site_name": 'string',
"description": 'string',
"thumbnail": 'string',
"url": 'string'
}
}
JsonArray.push(link);
//editor.setItems(editor.getItems());
});
</script>
</body>
</html>