1
0
mirror of https://github.com/octoleo/plantuml-server.git synced 2024-12-22 00:38:54 +00:00

[FEATURE] CodeMirror first basic implementation

This commit is contained in:
maximesinclair 2014-02-19 23:37:33 +01:00
parent 9ca32c8d22
commit 69fbe5d2b8
2 changed files with 12 additions and 2 deletions

View File

@ -157,6 +157,11 @@
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>codemirror</artifactId>
<version>3.21</version>
</dependency>
<dependency>
<groupId>HTTPClient</groupId>
<artifactId>HTTPClient</artifactId>

View File

@ -23,9 +23,11 @@
<meta http-equiv="expires" content="0" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache, must-revalidate" />
<link rel="stylesheet" href="${contextroot}/plantuml.css" type="text/css"/>
<link rel="icon" href="${contextroot}/favicon.ico" type="image/x-icon"/>
<link rel="shortcut icon" href="${contextroot}/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" href="${contextroot}/plantuml.css" />
<link rel="stylesheet" href="webjars/codemirror/3.21/lib/codemirror.css" />
<script src="webjars/codemirror/3.21/lib/codemirror.js"></script>
<title>PlantUMLServer</title>
</head>
<body>
@ -41,7 +43,7 @@
<%-- CONTENT --%>
<form method="post" accept-charset="UTF-8" action="${contextroot}/form">
<p>
<textarea name="text" cols="120" rows="10"><c:out value="${decoded}"/></textarea>
<textarea id="diagtext" name="text" cols="120" rows="10"><c:out value="${decoded}"/></textarea>
<br/>
<input type="submit" />
</p>
@ -82,5 +84,8 @@
</div>
<%-- FOOTER --%>
<%@ include file="footer.jspf" %>
<script>
var myCodeMirror = CodeMirror.fromTextArea(document.getElementById("diagtext"), {lineNumbers: true});
</script>
</body>
</html>