Skip to content

Commit dd9f034

Browse files
committed
Load frame & context from URL.
1 parent b5a0a70 commit dd9f034

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

playground/next/editor.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,10 @@ window.app = createApp({
565565
gatherHash() {
566566
const url = new URL(window.location);
567567
const hash = new URLSearchParams(url.hash.slice(1));
568+
this.contextDoc = JSON.parse(hash.get('context') || {});
569+
setEditorValue(this.contextEditor, this.contextDoc);
570+
this.frameDoc = JSON.parse(hash.get('frame') || {});
571+
setEditorValue(this.frameEditor, this.frameDoc);
568572
this.doc = JSON.parse(hash.get('json-ld') || {});
569573
setEditorValue(this.mainEditor, this.doc);
570574
this.outputTab = hash.get('startTab').slice(4);

0 commit comments

Comments
 (0)