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

Function openEditor

packages/sdk-playground/src/main.ts:1069–1088  ·  view source on GitHub ↗
(html: string, name = "untitled")

Source from the content-addressed store, hash-verified

1067}
1068
1069async function openEditor(html: string, name = "untitled") {
1070 if (comp) {
1071 comp.dispose();
1072 comp = null;
1073 }
1074 resetUiForOpen(name);
1075
1076 const { adapter: persist } = await createFileAdapter();
1077 const preview = new PlaygroundPreview();
1078 playgroundPreview = preview;
1079
1080 comp = await openComposition(html, { persist, preview, coalesceMs: 150 });
1081 wireCompositionEvents(comp);
1082
1083 renderElementList();
1084 renderInspectorContent();
1085 updatePreviewNow();
1086 renderTimeline();
1087 logEntry("info", `opened — ${comp.getElements().length} elements`);
1088}
1089
1090// ── DOM helpers ───────────────────────────────────────────────────────────────
1091

Callers 3

loadOldestVersionFunction · 0.85
confirmOpenFunction · 0.85
initFunction · 0.85

Calls 11

openCompositionFunction · 0.90
resetUiForOpenFunction · 0.85
createFileAdapterFunction · 0.85
wireCompositionEventsFunction · 0.85
renderElementListFunction · 0.85
renderInspectorContentFunction · 0.85
updatePreviewNowFunction · 0.85
renderTimelineFunction · 0.85
logEntryFunction · 0.85
disposeMethod · 0.65
getElementsMethod · 0.65

Tested by

no test coverage detected