adding some market elements

This commit is contained in:
metacryst
2025-10-29 22:27:56 -05:00
parent 759ee54c32
commit 9dec94e58e
6 changed files with 144 additions and 58 deletions

View File

@@ -487,6 +487,13 @@ HTMLElement.prototype.positionType = function (value) {
return this
}
HTMLElement.prototype.gap = function(value, unit = "px") {
if (typeof value !== 'number' || Number.isNaN(value))
throw new Error(`Invalid value: ${value}. Expected a number.`);
this.style.gap = value + unit
return this
}
/* Elements */
quill.setChildren = function(el, innerContent) {
@@ -617,6 +624,13 @@ window.input = function(placeholder, width, height) {
return el
}
window.label = function(text) {
let el = document.createElement("label")
el.innerText = text
quill.render(el)
return el
}
window.textarea = function(placeholder) {
let el = document.createElement("textarea")
el.placeholder = placeholder