mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-03 16:22:52 -06:00
minibar+syntax editor integration, work in progress 2
+ Transfer current astract syntax tree when activating the syntax editor
from the minibar.
+ Add options to start the minibar with given input. You need to include
the current grammar url, the current language and the input, like this:
initial_grammar: "/grammars/Foods.pgf",
initial: { from: "FoodsEng", input:["that","fish","is","fresh"]}
+ Fix a style sheet clash.
This commit is contained in:
@@ -19,20 +19,20 @@ var minibar_options= {
|
||||
try_google: true
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
if(window.Editor) // Syntax editor loaded?
|
||||
minibar_options.abstract_action=function(tree) {
|
||||
var editor_options = {
|
||||
target: "editor",
|
||||
initial: { grammar: minibar.grammar_menu.value, // hmm
|
||||
startcat: minibar.input.startcat_menu.value, // hmm
|
||||
ast: tree
|
||||
abstr: tree
|
||||
}
|
||||
}
|
||||
minibar.minibar.style.display="none"
|
||||
minibar.editor=new Editor(server,editor_options)
|
||||
}
|
||||
*/
|
||||
|
||||
if(/^\?\/tmp\//.test(location.search)) {
|
||||
var args=decodeURIComponent(location.search.substr(1)).split(" ")
|
||||
if(args[0]) online_options.grammars_url=args[0];
|
||||
|
||||
Reference in New Issue
Block a user