1
0
mirror of https://github.com/octoleo/plantuml-server.git synced 2024-06-17 07:32:23 +00:00
plantuml-server/src/main/webapp/previewer.jsp
Florian f727c6dd13 frontend 2.0: initial version
- auto refresh function
- light and dark theme
- monaco editor (vscode) with "apex" as syntax highlighting language
  * apex seems to work quite fine (better than no highlighting)
  * future possibility: own plantuml language syntax support
  * future possibility: autocomplete (to much work but maybe partial)
    - implemented example for `!theme ...`
    - implemented example for `<&icon>`
  * future possibility: code validation
    - implemented example for `@start...` and `@end...`:
      * should be the first or last command
      * should be of the some type (e.g. `@startyaml` and @endyaml)
      * should be used exactly once per document/diagram
- editor and preview is splitable into two windows like the
  "Extract window" functionality on
  (plantuml.com)[https://www.plantuml.com/plantuml]
- multi index / multi paging diagram support
- diagram can be displayed/rended as PNG, SVG, ASCII Art or PDF
- Ctrl+s download the PlantUML Code as code file (diagram.puml)
- Ctrl+, opens the settings and Esc closes the settings
2023-05-03 13:23:47 -04:00

27 lines
954 B
Plaintext

<%@ page info="index" contentType="text/html; charset=utf-8" pageEncoding="utf-8" session="false" %>
<%
// diagram sources
String encoded = request.getAttribute("encoded").toString();
String index = request.getAttribute("index").toString();
String diagramUrl = ((index.isEmpty()) ? "" : index + "/") + encoded;
// map for diagram source if necessary
String map = request.getAttribute("map").toString();
boolean hasMap = !map.isEmpty();
// properties
boolean showSocialButtons = (boolean)request.getAttribute("showSocialButtons");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="resource/htmlheadbase.jsp" %>
<title>PlantUML Server</title>
</head>
<body>
<div class="content viewer-content">
<%-- Preview --%>
<%@ include file="resource/preview.jsp" %>
</div>
</body>
</html>