MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / appendContentSection

Function appendContentSection

packages/sdk-playground/src/main.ts:497–513  ·  view source on GitHub ↗
(container: HTMLElement, el: PropEl)

Source from the content-addressed store, hash-verified

495type PropEl = NonNullable<ReturnType<Composition["getElement"]>>;
496
497function 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
515const WEIGHTS = ["", "300", "400", "500", "600", "700", "800", "900"];
516

Callers 1

renderPropertiesContentFunction · 0.85

Calls 3

propSectionFunction · 0.85
logEntryFunction · 0.85
setTextMethod · 0.65

Tested by

no test coverage detected