mirror of
https://github.com/Minres/RDL-Editor.git
synced 2025-07-01 05:33:25 +02:00
Migrated to XText 2.14 and Photon for RDL Editor RCP
This commit is contained in:
44
com.minres.rdl.parent/com.minres.rdl.web/WebRoot/index.html
Normal file
44
com.minres.rdl.parent/com.minres.rdl.web/WebRoot/index.html
Normal file
@ -0,0 +1,44 @@
|
||||
<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>
|
Reference in New Issue
Block a user