markuplm-large / widget.html
Tigran Tokmajyan
Add widget stuff
b6d576a
raw
history blame contribute delete
943 Bytes
<div>
<div class="form-group">
<label>HTML/XML Input</label>
<textarea
id="html-input"
class="form-control"
rows="10"
placeholder="Paste your HTML/XML here..."
></textarea>
</div>
<div class="form-group">
<label>Question</label>
<textarea
id="question-input"
class="form-control"
rows="2"
placeholder="Enter your question..."
></textarea>
</div>
<script>
// This function will be called when the user clicks "Compute"
async function query() {
const html = document.querySelector("#html-input").value;
const question = document.querySelector("#question-input").value;
// Combine inputs into the JSON format your handler expects
return {
inputs: {
html: html,
question: question
}
};
}
</script>
</div>