forked from summernote/summernote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwith-google-font.html
50 lines (45 loc) · 1.67 KB
/
with-google-font.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>summernote</title>
<!-- include jquery -->
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Coming+Soon|Exo+2" rel="stylesheet">
<!-- include libraries BS -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.js"></script>
<!-- include summernote -->
<link rel="stylesheet" href="../dist/summernote-bs4.css">
<script type="text/javascript" src="../dist/summernote-bs4.js"></script>
<script type="text/javascript">
$(function() {
$('.summernote').summernote({
height: 200,
fontNames : ['Coming Soon'],
fontNamesIgnoreCheck: ['Coming Soon']
});
$('form').on('submit', function (e) {
e.preventDefault();
alert($('.summernote').summernote('code'));
alert($('.summernote').val());
});
});
</script>
</head>
<body>
<form action="#" novalidate>
<div class="form-group">
<label for="input">Text</label>
<input type="text" class="form-input" id="input" value="Title">
</div>
<div class="form-group">
<label for="contents">Contents</label>
<textarea name="text" class="summernote" id="contents" title="Contents"></textarea>`
</div>
<button type="submit" class="btn btn-default">submit</button>
</form>
</body>
</html>