(container: HTMLElement, el: PropEl)
| 495 | type PropEl = NonNullable<ReturnType<Composition["getElement"]>>; |
| 496 | |
| 497 | function appendContentSection(container: HTMLElement, el: PropEl) { |
| 498 | if (el.text === null) return; |
| 499 | const sec = propSection("Content"); |
| 500 | const row = document.createElement("div"); |
| 501 | row.className = "prop-row"; |
| 502 | const ta = document.createElement("textarea"); |
| 503 | ta.className = "prop-input wide"; |
| 504 | ta.value = el.text; |
| 505 | ta.addEventListener("blur", () => { |
| 506 | if (!comp || !selectedId) return; |
| 507 | comp.setText(selectedId, ta.value); |
| 508 | logEntry("op", { setText: { id: selectedId, value: ta.value } }); |
| 509 | }); |
| 510 | row.appendChild(ta); |
| 511 | sec.appendChild(row); |
| 512 | container.appendChild(sec); |
| 513 | } |
| 514 | |
| 515 | const WEIGHTS = ["", "300", "400", "500", "600", "700", "800", "900"]; |
| 516 |
no test coverage detected