Triply-Dev / YASGUI.YASQE-deprecated

Deprecated, see https://github.com/TriplyDB/Yasgui for the Yasgui monorepo
MIT License
73 stars 36 forks source link

Make it easier to provide your own list of autocompletions #120

Closed LaurensRietveld closed 4 years ago

LaurensRietveld commented 7 years ago

To change the prefix autocompletion list to a static one, now requires the following code:

YASQE.Autocompleters._prefixes = YASQE.Autocompleters.prefixes;
YASQE.Autocompleters.prefixes = function(yasqe, completerName) {
  var completer = YASQE.Autocompleters._prefixes(yasqe, completerName);
  completer.async = false;
  completer.get = ["rdf: <http://bla>"];
  return completer;
};

This should be simplified.

LaurensRietveld commented 4 years ago

This became easier now. Yasqe provides a forkAutocompleter setting. For the above, it would work like this:

Yasqe.forkAutocompleter('prefixes', {
  async: false,
  get: ["rdf: <http://bla>"]
})

(see https://github.com/TriplyDB/Yasgui and https://yasgui.triply.cc)