RDL-Editor/com.minres.rdl.parent/com.minres.rdl.web/WebRoot/index.html

45 lines
1.2 KiB
HTML
Raw Normal View History

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Language" content="en-us">
<title>Example Web Editor</title>
<link rel="stylesheet" type="text/css" href="xtext/2.14.0/xtext-ace.css"/>
<link rel="stylesheet" type="text/css" href="style.css"/>
<script src="webjars/requirejs/2.3.2/require.min.js"></script>
<script type="text/javascript">
var baseUrl = window.location.pathname;
var fileIndex = baseUrl.indexOf("index.html");
if (fileIndex > 0)
baseUrl = baseUrl.slice(0, fileIndex);
require.config({
baseUrl: baseUrl,
paths: {
"jquery": "webjars/jquery/2.2.4/jquery.min",
"ace/ext/language_tools": "webjars/ace/1.2.3/src/ext-language_tools",
"xtext/xtext-ace": "xtext/2.14.0/xtext-ace"
}
});
require(["webjars/ace/1.2.3/src/ace"], function() {
require(["xtext/xtext-ace"], function(xtext) {
xtext.createEditor({
baseUrl: baseUrl,
syntaxDefinition: "xtext-resources/generated/mode-rdl"
});
});
});
</script>
</head>
<body>
<div class="container">
<div class="header">
<h1>Example RDL Web Editor</h1>
</div>
<div class="content">
<div id="xtext-editor" data-editor-xtext-lang="rdl"></div>
</div>
</div>
</body>
</html>