textarea输入,增加上一次 输入记录

This commit is contained in:
shadowcz007
2024-01-04 12:57:55 +08:00
parent efb0e147c5
commit c6f964c921
+3 -1
View File
@@ -980,8 +980,9 @@
// Create an input field for the image name
const textInput = document.createElement("textarea");
// textInput.className=;
// uploadImageInput.type = "text";
textInput.value = data.inputs.text;
textInput.value = localStorage.getItem(`t_${data.id}`) || data.inputs.text;
uploadContainer.appendChild(textInput);
function autoResize(textarea) {
@@ -993,6 +994,7 @@
// console.log(textInput.value)
autoResize(textInput);
window._appData.data[data.id].inputs.text = textInput.value;
localStorage.setItem(`t_${data.id}`, textInput.value);
})
// Append the upload container to the main container