You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.7 KiB
51 lines
1.7 KiB
1 year ago
|
<!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>
|