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:
hallgren
2012-11-21 17:13:21 +00:00
parent 381dc3900c
commit e7b14316dd
3 changed files with 31 additions and 22 deletions

View File

@@ -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];