adding qr codes, converting site to quill
This commit is contained in:
@@ -113,10 +113,9 @@ window.quill = {
|
||||
if(el instanceof Shadow) {
|
||||
let parent = quill.rendering[quill.rendering.length-1]
|
||||
if(!parent) {
|
||||
document.currentScript.replaceWith(el)
|
||||
} else {
|
||||
parent.appendChild(el)
|
||||
parent = document.body
|
||||
}
|
||||
parent.appendChild(el)
|
||||
} else {
|
||||
if(!el.render) {el.render = () => {}}
|
||||
let parent = quill.rendering[quill.rendering.length-1]
|
||||
@@ -572,11 +571,11 @@ window.form = function(cb) {
|
||||
return el
|
||||
}
|
||||
|
||||
window.input = function(placeholder, dimensions) {
|
||||
window.input = function(placeholder, width, height) {
|
||||
let el = document.createElement("input")
|
||||
el.placeholder = placeholder
|
||||
if(dimensions.width) el.style.width = dimensions.width
|
||||
if(dimensions.height) el.style.height = dimensions.height
|
||||
el.style.width = width
|
||||
el.style.height = height
|
||||
quill.render(el)
|
||||
return el
|
||||
}
|
||||
@@ -751,8 +750,17 @@ HTMLElement.prototype.removeAllListeners = function() {
|
||||
/* ATTRIBUTES */
|
||||
|
||||
HTMLElement.prototype.attr = function(attributes) {
|
||||
if (
|
||||
typeof attributes !== "object" ||
|
||||
attributes === null ||
|
||||
Array.isArray(attributes)
|
||||
) {
|
||||
throw new TypeError("attr() expects an object with key-value pairs");
|
||||
}
|
||||
|
||||
for (const [key, value] of Object.entries(attributes)) {
|
||||
this.setAttribute(key, value);
|
||||
}
|
||||
console.log(this)
|
||||
return this;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user