summaryrefslogtreecommitdiff
path: root/src/www/syntax-editor/editor.html
diff options
context:
space:
mode:
authorjohn.j.camilleri <john.j.camilleri@chalmers.se>2012-11-13 15:14:49 +0000
committerjohn.j.camilleri <john.j.camilleri@chalmers.se>2012-11-13 15:14:49 +0000
commit5c8c1f768fae242ba659d4b6a3696336042e0b1c (patch)
tree463f4007559a5b43cc3f789dd0e21b6a72b981fd /src/www/syntax-editor/editor.html
parent27e675910a88fec3d7f0cc0ac6020d86f1089fe7 (diff)
Add first demo of new syntax editor
As part of the GF cloud stuff, it can be accessed from http://cloud.grammaticalframework.org/syntax-editor/editor.html
Diffstat (limited to 'src/www/syntax-editor/editor.html')
-rw-r--r--src/www/syntax-editor/editor.html43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/www/syntax-editor/editor.html b/src/www/syntax-editor/editor.html
new file mode 100644
index 000000000..d641998ab
--- /dev/null
+++ b/src/www/syntax-editor/editor.html
@@ -0,0 +1,43 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <link rel="author" href="http://www.grammaticalframework.org/~john/" title="John J. Camilleri">
+ <title>Syntax Editor</title>
+ <link rel="stylesheet" type="text/css" href="http://cloud.grammaticalframework.org/minibar/minibar.css" />
+ <link rel="stylesheet" type="text/css" href="ui/style.css" />
+</head>
+<body>
+ <h2>Syntax Editor</h2>
+ <div id="editor"></div>
+ <noscript>This page doesn't works unless JavaScript is enabled.</noscript>
+
+ <hr />
+ <small class="modtime">
+ John J. Camilleri, November 2012
+ </small>
+
+ <script type="text/javascript" src="js/support.js"></script>
+ <script type="text/javascript" src="js/pgf_online.js"></script>
+ <script type="text/javascript" src="js/ast.js"></script>
+ <script type="text/javascript" src="js/editor_menu.js"></script>
+ <script type="text/javascript" src="js/editor.js"></script>
+ <script type="text/javascript">
+ // Code taken from minibar_online.js
+ var server_options = {
+ //grammars_url: "http://www.grammaticalframework.org/grammars/",
+ //grammars_url: "http://localhost:41296/grammars/",
+ }
+ var editor_options = {
+ target: "editor"
+ }
+ if(/^\?\/tmp\//.test(location.search)) {
+ var args=decodeURIComponent(location.search.substr(1)).split(" ")
+ if(args[0]) server_options.grammars_url=args[0];
+ }
+ var server = pgf_online(server_options);
+ var editor = new Editor(server, editor_options);
+ </script>
+
+</body>
+</html>