|
@@ -47,22 +47,22 @@ function loadTitleData(blockArray, blockIndex, h, text) {
|
|
|
}
|
|
|
|
|
|
function handleDescButton(blockDiv, blockArray, blockIndex, dataIndex, text) {
|
|
|
- const {p, descTextArea, descInputButton, descRemoveButton} = getdescElements(blockDiv);
|
|
|
+ const {descTextArea, descInputButton, descRemoveButton} = getdescElements(blockDiv);
|
|
|
if (text !== undefined) {
|
|
|
- handleDescInputClick(p, text, blockArray, blockIndex, dataIndex);
|
|
|
+ handleDescInputClick(descTextArea, text, blockArray, blockIndex, dataIndex);
|
|
|
}
|
|
|
descInputButton.onclick = function() {
|
|
|
- handleDescInputClick(p, descTextArea.value, blockArray, blockIndex, dataIndex);
|
|
|
+ handleDescInputClick(descTextArea, descTextArea.value, blockArray, blockIndex, dataIndex);
|
|
|
}
|
|
|
descRemoveButton.onclick = function() {
|
|
|
- removeDescElement(p, descTextArea, descInputButton, descRemoveButton);
|
|
|
+ removeDescElement(descTextArea, descInputButton, descRemoveButton);
|
|
|
removeDescData(blockArray, blockIndex, dataIndex);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function handleDescInputClick(p, desc, blockArray, blockIndex, ownDataIndex) {
|
|
|
- p.textContent = desc;
|
|
|
- addDataToBlockArray({description: {text: desc + '\n'}}, blockArray, blockIndex, ownDataIndex)
|
|
|
+function handleDescInputClick(textArea, description, blockArray, blockIndex, ownDataIndex) {
|
|
|
+ textArea.textContent = description;
|
|
|
+ addDataToBlockArray({description: {text: description + '\n'}}, blockArray, blockIndex, ownDataIndex)
|
|
|
}
|
|
|
|
|
|
function handleImgButton(blockDiv, blockArray, blockIndex, dataIndex, preImgObject) {
|