diff --git a/editor.html b/editor.html
index a5e657b3..d525d1c3 100644
--- a/editor.html
+++ b/editor.html
@@ -1301,6 +1301,7 @@
Telegram Limits Editor
const idContainer = document.createElement('span');
idContainer.classList.add('id-container');
+ idContainer.textContent = '>';
idContainer.addEventListener('click', () => {
const newId = prompt('New Section ID:', sectionId);
@@ -1319,7 +1320,7 @@ Telegram Limits Editor
}
sectionId = newId;
- idContainer.textContent = newId;
+ idContainer.textContent = newId || '';
});
const newSectionName = document.createElement('input');
@@ -1337,7 +1338,7 @@ Telegram Limits Editor
} while (checkIfSectionIdExists(newSectionId));
sectionId = newSectionId;
- idContainer.textContent = sectionId;
+ idContainer.textContent = sectionId || '';
});
const colorSuggestions = [
@@ -1749,6 +1750,28 @@ Telegram Limits Editor
const idContainer = document.createElement('span');
idContainer.classList.add('id-container');
+ idContainer.textContent = '';
+
+ idContainer.addEventListener('click', () => {
+ const newId = prompt('New Item ID:', itemId);
+
+ if (!newId) return;
+
+ try {
+ this.editor.validateSectionId(newId);
+ } catch (error) {
+ alert(error.message);
+ return;
+ }
+
+ if (checkIfItemIdExists(newId)) {
+ alert('Item with this ID already exists.');
+ return;
+ }
+
+ itemId = newId;
+ idContainer.textContent = itemId || '';
+ });
const newItemTitleContainer = document.createElement('div');
newItemTitleContainer.classList.add('title-field-container');
@@ -1769,7 +1792,7 @@ Telegram Limits Editor
} while (checkIfItemIdExists(newItemId));
itemId = newItemId;
- idContainer.textContent = itemId;
+ idContainer.textContent = itemId || '';
});
newItemName.style.height = "5px";