We create export json for pages then write a click handler that will open that as import dialog in the lineup.
function latlon () { return [ 41.6 + Math.random()/2, -88.14 + Math.random()/2] .join(",") } function chicago (when) { return { title: `Chicago, ${when}`, story: [{type:"map", text:latlon(), zoom:12}] } }
function exports () { return { "chicago-first": chicago('First'), "chicago-second": chicago('Second'), "chicago-third": chicago('Third') } }
function handler (event) { let message = { action: "importer", pages: exports(), keepLineup: event.shiftKey } window.parent.postMessage(message, "*"); }
output.innerHTML = `<button>Open Importer</button>` output.addEventListener("click", handler)
//wiki.ralfbarkow.ch/assets/pages/snippet-template/basicjs.html?snippet-template HEIGHT 200
Create Items and Pages with more complete json.