forked from hirandesai/whatsapp-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
32 lines (27 loc) · 1.2 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
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
<link rel="stylesheet" href="src\css\whatsapp-editor.css">
</head>
<body>
<div id="whatsapp-editor-container">
</div>
<br />
<button onclick="return getWhatAppFormattedContent();">Get Whatsapp Content</button>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript" src="src\js\whatsapp-editor.js"></script>
<script type="text/javascript">
var editor;
$(function () {
editor = $("#whatsapp-editor-container").whatsappEditor({content:'<b>Hello</b><div><i>World</i></div>'});
});
function getWhatAppFormattedContent() {
alert(editor.getFormattedContent());
return false;
}
</script>
</body>
</html>