Use textareas for block text

This commit is contained in:
Adam Goldsmith 2017-10-09 03:27:42 -04:00
parent 9d0326a115
commit 29b3b70738
2 changed files with 5 additions and 3 deletions

View File

@ -124,8 +124,10 @@ function setForm(cardTemplate, card) {
let label = div.appendChild(document.createElement('label'));
label.textContent = prop[0];
let input = label.appendChild(document.createElement('input'));
let input = label.appendChild(
document.createElement(prop[1] === 'textarea' ? 'textarea' : 'input'));
input.id = "card-" + prop[0];
if (prop[1] === "image") {
input.type = "file";
}

View File

@ -4,8 +4,8 @@
"inputs": {
"name": "text",
"keywords": "text",
"text": "text",
"flavor": "text",
"text": "textarea",
"flavor": "textarea",
"artist": "text",
"hp": "number",
"image": "image"