Yet Another Sparql Query Editor

Funded by

About YASQE

YASQE is part of the regular YASGUI web application. YASQE provides a simple syntax highlighted text area, bundled with features such as autocompletion, and the option to query SPARQL endpoints.
var yasqe = YASQE(document.getElementById("showcase"));
(or, if you would like to instantiate YASQE from an existing text area, use var yasqe = YASQE.fromTextArea(document.getElementById('textAreaItem'));

Features

YASQE features:
  • Completely client-side
  • SPARQL syntax highlighting and error checking
  • Extremely customizable: All functions and handlers from the CodeMirror library are accessible
  • Persistent values (optional): your query is stored for easier reuse between browser sessions
  • Prefix autocompletion (using prefix.cc)
  • Property and class autocompletion (using the Linked Open Vocabularies API)
  • Easily add your own property and class autocompletions if you have them
  • Handy keyboard shortcuts
  • Possible to execute the query directly

Download the latest release

GitHub

Visit the GitHub repository to download the YASQE .css and .js files (find them in the dist directory).
Download latest release from GitHub 

YASQE is registered as a node package as well, so you'll be able to use the node package manager to keep your version of YASQE up to date.
Show NPM Package

Keyboard shortcuts

YASQE comes with some useful keyboard shortcuts. And even better, take a look at the documentation on how to add your own. Some examples:
  • [CTRL|CMD] - /: Comment/uncomment line(s)
  • [CTRL|CMD] - D: Delete line(s)
  • [CTRL|CMD] - ENTER: Execute query
  • [CTRL|CMD] - SHIFT - f: Auto-format selected lines
  • [CTRL|CMD] - [: Move line(s) left (unindent)
  • [CTRL|CMD] - ]: Move line(s) right (indent)
  • [CTRL|CMD] - ALT - down: Copy line(s) down
  • [CTRL|CMD] - ALT - up: Copy line(s) up
  • [CTRL|CMD] - Enter: Execute query (if you have defined handlers in the configuration)
  • [CTRL|CMD] - S: Store the editor contents in local storage (if this is enabled)

Thanks!

A big thanks goes out to:
  • The people behind the Flint SPARQL editor for publishing the javascript SPARQL grammar
  • Marijn Haverbeke for his great work on the CodeMirror library syntax highlighting library
  • Pierre-Yves Vandenbussche and Bernard Vatant for their useful Linked Open Vocabularies service, of which I use the API to autocomplete properties and classes
  • Richard Cyganiak for his simple but effective Prefix.cc service, which I use for autocompleting prefixes.