jspblog : writeForm - summernote api
This commit is contained in:
@@ -2,8 +2,37 @@
|
|||||||
|
|
||||||
<%@ include file="../layout/header.jsp"%>
|
<%@ include file="../layout/header.jsp"%>
|
||||||
|
|
||||||
<h1>세션 테스트</h1>
|
<div class="container">
|
||||||
로그인 유저네임 : ${sessionScope.principal.username}
|
|
||||||
|
<div class="m-2">
|
||||||
|
<form class="form-inline d-flex justify-content-end" action="${pageContext.request.contextPath}/board">
|
||||||
|
<input type="hidden" name="cmd" value="search" />
|
||||||
|
<input type="hidden" name="page" value="0" />
|
||||||
|
|
||||||
|
<input type="text" name="keyword" class="form-control mr-sm-2" placeholder="Search">
|
||||||
|
<button class="btn btn-primary m-1">검색</button>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="progress col-md-12 m-2">
|
||||||
|
<div class="progress-bar" style="width: 70%"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card col-md-12 m-2">
|
||||||
|
<div class="card-body">
|
||||||
|
<h4 class="card-title">제목</h4>
|
||||||
|
<a href="#" class="btn btn-primary">상세보기</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<ul class="pagination justify-content-center">
|
||||||
|
<li class="page-item disabled"><a class="page-link" href="#">Previous</a></li>
|
||||||
|
<li class="page-item"><a class="page-link" href="#">Next</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
33
jspblog/src/main/webapp/board/writeForm.jsp
Normal file
33
jspblog/src/main/webapp/board/writeForm.jsp
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
|
|
||||||
|
<%@ include file="../layout/header.jsp" %>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<form action="#" method="POST">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="title">Title:</label>
|
||||||
|
<input type="text" class="form-control" placeholder="title" id="title" name="title">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="content">Content:</label>
|
||||||
|
<textarea class="form-control" rows="5" id="summernote" name="content"></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="submit" class="btn btn-primary">글쓰기 등록</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#summernote').summernote({
|
||||||
|
placeholder: '글쓰기',
|
||||||
|
tabsize: 2,
|
||||||
|
height: 400
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -11,6 +11,8 @@
|
|||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.css" rel="stylesheet">
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|||||||
26
jspblog/src/main/webapp/test/summernote.jsp
Normal file
26
jspblog/src/main/webapp/test/summernote.jsp
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Summernote</title>
|
||||||
|
<link href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
|
||||||
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.css" rel="stylesheet">
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="summernote"></div>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#summernote').summernote({
|
||||||
|
placeholder: '글쓰기',
|
||||||
|
tabsize: 2,
|
||||||
|
height: 400
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user