This demo provides all you need to integrate a SPARQL query editor into a website/webapp.
The SPARQL query editor is a simple web component. It is using sparql-http-client for fetching the data and rdf-literal for proper datatype handling in JavaScript.