46 lines
1.6 KiB
Plaintext
46 lines
1.6 KiB
Plaintext
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<title>CKEditor 5 InlineEditor build</title>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<link rel="stylesheet" type="text/css" href="<c:url value='/vendor/ckeditor5/css/styles.css' />">
|
||
<script src="<c:url value='/vendor/jquery/3.4.1/jquery-3.4.1.min.js' />"></script>
|
||
</head>
|
||
<body data-editor="InlineEditor" data-collaboration="false">
|
||
<div class="editor">
|
||
<h2>Bilingual Personality Disorder</h2>
|
||
<p>
|
||
This may be the first time you hear about this made-up disorder but
|
||
it actually isn’t so far from the truth. Even the studies that were conducted almost half a century show that
|
||
<strong>the language you speak has more effects on you than you realise</strong>.
|
||
</p>
|
||
</div>
|
||
<br>
|
||
<button type="button" id="btn_check">내용확인</button>
|
||
|
||
<script src="<c:url value='/vendor/ckeditor5/ckeditor.js' />"></script>
|
||
<script>
|
||
$("#btn_check").click(function(e) {
|
||
if(window.editor.getData().length < 1){
|
||
alert("내용을 입력해 주세요.");
|
||
return;
|
||
}else{
|
||
alert(window.editor.getData());
|
||
}
|
||
});
|
||
|
||
InlineEditor.create( document.querySelector( '.editor' ) )
|
||
.then( editor => {
|
||
window.editor = editor;
|
||
} )
|
||
.catch( error => {
|
||
console.error( 'There was a problem initializing the editor.', error );
|
||
} );
|
||
</script>
|
||
</body>
|
||
</html>
|