From 64d463dddffcdb8195343aa45a549c4ec06a001d Mon Sep 17 00:00:00 2001 From: "john.j.camilleri" Date: Tue, 11 Dec 2012 09:42:57 +0000 Subject: [PATCH] Syntax editor: add about.html (and a Makefile for generating it) --- src/www/syntax-editor/Makefile | 2 + src/www/syntax-editor/README.md | 80 ++++++++++++++++------ src/www/syntax-editor/about.html | 112 +++++++++++++++++++++++++++++++ 3 files changed, 172 insertions(+), 22 deletions(-) create mode 100644 src/www/syntax-editor/Makefile create mode 100644 src/www/syntax-editor/about.html diff --git a/src/www/syntax-editor/Makefile b/src/www/syntax-editor/Makefile new file mode 100644 index 000000000..6f2ccc26b --- /dev/null +++ b/src/www/syntax-editor/Makefile @@ -0,0 +1,2 @@ +html: + pandoc --from=markdown --to=html5 --parse-raw --output=about.html README.md diff --git a/src/www/syntax-editor/README.md b/src/www/syntax-editor/README.md index 50f911f13..1a029f9b5 100644 --- a/src/www/syntax-editor/README.md +++ b/src/www/syntax-editor/README.md @@ -1,3 +1,13 @@ + + + +About the syntax editor + + + + + + # GF web-based syntax editor John J. Camilleri @@ -7,35 +17,55 @@ An improved version of the [old syntax editor][1]. [1]:http://www.grammaticalframework.org/~meza/restWiki/editor.html -## Notes - -- Tested with latest Chrome and Firefox (only). - -## Available startup options - -|Options|Description|Default| -|-------|-----------|-------| -|target | |"editor"| -|initial.grammar|Initial grammar URL, e.g. `"http://localhost:41296/grammars/Foods.pgf"`|-| -|initial.startcat|Initial startcat|-| -|initial.languages|Initial linearisation languages, e.g. `["Eng","Swe","Mlt"]`|-| -|initial.abstr|Initial abstract tree (as string), e.g. `"Pred (That Fish) Expensive"`|-| -|show.grammar_menu|Show grammar menu?|true| -|show.startcat_menu|Show start category menu?|true| -|show.to_menu|Show languages menu?|true| -|show.random_button|Show random button?|true| - ## Example usage See `editor.html` and `editor_online.js`. -## Bugs +## Available startup options -- Change startcat doesn't work when given an initial startcat ++---------------------+--------------------------------------------------+--------+ +|Options |Description |Default | ++=====================+==================================================+========+ +|target | |"editor"| +| | | | ++---------------------+--------------------------------------------------+--------+ +|initial.grammar |Initial grammar URL, | | +| |e.g. `"http://localhost:41296/grammars/Foods.pgf"`| | ++---------------------+--------------------------------------------------+--------+ +|initial.startcat |Initial startcat |(grammar| +| | |default)| ++---------------------+--------------------------------------------------+--------+ +|initial.languages |Initial linearisation languages, |(all) | +| |e.g. `["Eng","Swe","Mlt"]` | | ++---------------------+--------------------------------------------------+--------+ +|initial.abstr |Initial abstract tree (as string), e.g. `"Pred | | +| |(That Fish) Expensive"` | | ++---------------------+--------------------------------------------------+--------+ +|show_grammar_menu |Show grammar menu? |True | +| | | | ++---------------------+--------------------------------------------------+--------+ +|show_startcat_menu |Show startcat menu? |True | +| | | | ++---------------------+--------------------------------------------------+--------+ +|show_to_menu |Show languages menu? |True | +| | | | ++---------------------+--------------------------------------------------+--------+ +|show_random_button |Show random button? |True | +| | | | ++---------------------+--------------------------------------------------+--------+ +|show_import |Show import button/panel? |True | +| | | | ++---------------------+--------------------------------------------------+--------+ +|show_export |Show export button? |True | +| | | | ++---------------------+--------------------------------------------------+--------+ -## TODO +## Notes + +- Tested with latest Chrome and Firefox (only). + +## To do/feature requests -- Import AST from text field - Compatibility with grammars with dependent category types - Clicking on tokens to select tree node - Clipboard of trees @@ -46,3 +76,9 @@ See `editor.html` and `editor_online.js`. - undo/redo (or back/forward) navigation - structure fridge magnets more (eg newline before the magnet whose first letter is different) +## Known bugs + +- Change startcat doesn't work when given an initial startcat + + + diff --git a/src/www/syntax-editor/about.html b/src/www/syntax-editor/about.html new file mode 100644 index 000000000..a05d1dd20 --- /dev/null +++ b/src/www/syntax-editor/about.html @@ -0,0 +1,112 @@ + + + + +About the syntax editor + + + + + +

GF web-based syntax editor

+

John J. Camilleri
December 2012

+

An improved version of the old syntax editor.

+

Example usage

+

See editor.html and editor_online.js.

+

Available startup options

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionsDescriptionDefault
target + +"editor"
initial.grammarInitial grammar URL, e.g. "http://localhost:41296/grammars/Foods.pgf" + +
initial.startcatInitial startcat(grammar default)
initial.languagesInitial linearisation languages, e.g. ["Eng","Swe","Mlt"](all)
initial.abstrInitial abstract tree (as string), e.g. "Pred (That Fish) Expensive" + +
show_grammar_menuShow grammar menu?True
show_startcat_menuShow startcat menu?True
show_to_menuShow languages menu?True
show_random_buttonShow random button?True
show_importShow import button/panel?True
show_exportShow export button?True
+

Notes

+ +

To do/feature requests

+ +

Known bugs

+ + + + +