https://cdn.laji.fi/label-designer/<version>/editor.js
.<label-designer></label-designer>
To get access to the element you can use the following snippet
var labelDesigner = document.querySelector('label-designer');
// To access inputs you can access properties directly
labelDesigner.availableFields = [...];
// To access outputs you need to addEventListeners to corresponding events
labelDesigner.addEventListener('html', function(event) {
// event.detail will hold the emitted value.
// This event is returning object with html and filename properties so you can access them like this:
var html = event.detail.html;
var filename = event.detail.filename;
});
Source code for the custom element is available here