{"id":19,"date":"2026-07-02T07:07:12","date_gmt":"2026-07-02T05:07:12","guid":{"rendered":"https:\/\/wordpress.openeduhub.de\/?p=19"},"modified":"2026-07-03T10:52:53","modified_gmt":"2026-07-03T08:52:53","slug":"testbene","status":"publish","type":"post","link":"https:\/\/wordpress.openeduhub.de\/?p=19","title":{"rendered":"testBene"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">wlo-search-widget as html<\/h2>\n\n\n\n<wlo-search-widget id=\"searchWidget\" search-label=\"Suche\" search-placeholder=\"Findet passende Inhalte, Tools &amp; Quellen f\u00fcr den Unterricht ...\" search-input-min-width=\"575px\" target=\"_blank\"><\/wlo-search-widget>\n\n\n\n<h2 class=\"wp-block-heading\">wlo-search-widgets as edusharing plugin<\/h2>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">collectionChips2<\/h2>\n\n\n<edu-sharing-generic-widget context-node-id=\"5e40e372-735c-4b17-bbf7-e827a5702b57\" widget-type=\"collection-chips\" config-overwrite=\"{&quot;collectionListLayout&quot;:1,&quot;sortedNodeIds&quot;:[&quot;94f22c9b-0d3a-4c1c-8987-4c8e83f3a92e&quot;,&quot;69f9ff64-93da-4d68-b849-ebdf9fbdcc77&quot;,&quot;eef047a3-58ba-419c-ab7d-3d0cfd04bb4e&quot;,&quot;66c667bc-8777-4c57-b476-35f54ce9ff5d&quot;,&quot;ea776a48-b3f4-446c-b871-19f84b31d280&quot;,&quot;15fce411-54d9-467f-8f35-61ea374a298d&quot;,&quot;4940d5da-9b21-4ec0-8824-d16e0409e629&quot;]}\"><\/edu-sharing-generic-widget>\n\n\n<h2 class=\"wp-block-heading\">collectionChipsOverview<\/h2>\n\n\n<edu-sharing-generic-widget context-node-id=\"5e40e372-735c-4b17-bbf7-e827a5702b57\" widget-type=\"collection-chips\" config-overwrite=\"{&quot;collectionListLayout&quot;:1,&quot;sortedNodeIds&quot;:[&quot;94f22c9b-0d3a-4c1c-8987-4c8e83f3a92e&quot;,&quot;69f9ff64-93da-4d68-b849-ebdf9fbdcc77&quot;,&quot;eef047a3-58ba-419c-ab7d-3d0cfd04bb4e&quot;,&quot;66c667bc-8777-4c57-b476-35f54ce9ff5d&quot;,&quot;ea776a48-b3f4-446c-b871-19f84b31d280&quot;,&quot;15fce411-54d9-467f-8f35-61ea374a298d&quot;,&quot;4940d5da-9b21-4ec0-8824-d16e0409e629&quot;]}\"><\/edu-sharing-generic-widget>\n\n<edu-sharing-generic-widget context-node-id=\"94f22c9b-0d3a-4c1c-8987-4c8e83f3a92e\" widget-type=\"collection-chips\" node-id=\"90557e9e-4569-4329-957e-9e45694329ad\"><\/edu-sharing-generic-widget>\n\n\n<p class=\"wp-block-paragraph\">wlo formular<\/p>\n\n\n\n<iframe id=\"mds-frame\" class=\"wlo-form-iframe\" style=\"opacity: 1; height: 690px; width:100%\" frameborder=\"0\">\n        <\/iframe>\n        \n<script>\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n  const iframe = document.getElementById(\"mds-frame\");\n  console.log('frame', iframe);\n\n  \/\/ Read query params from current page URL\n  const params = new URLSearchParams(window.location.search);\n\n  \/\/ Get \"group\" from query string (fallback if not present)\n  let group = \"wlo_upload_source\";\n  let data = {};\n  if(params.get(\"type\") === 'tool'){  group = \"wlo_upload_tool\";\n  }\nif(params.get(\"type\") === 'material'){  group = \"wlo_upload_content\";\n  }\n  if(params.get(\"collectionID\")) {\n      data[\"ccm:curriculum\"]=[\"http:\/\/w3id.org\/openeduhub\/vocabs\/oeh-topics\/\" + params.get(\"collectionID\")];\n  }\n  \/\/ Build new iframe URL\n  const baseUrl = \"https:\/\/repository.staging.openeduhub.net\/edu-sharing\/components\/embed\/mds\";\n  const set = \"mds_oeh\";\n\n  const newSrc = `${baseUrl}?set=${encodeURIComponent(set)}&group=${encodeURIComponent(group)}&data=${encodeURIComponent(JSON.stringify(data))}`;\n\n  \/\/ Update iframe\n  iframe.src = newSrc;\n  \n  function receiveMessage(event){\n        if(event.data.event == 'POST_DATA'){\n            const mds = event.data.data;\n            console.log(event.data);\n            if(mds==null){\n                alert('Bitte f\u00fcgen Sie eine Datei\/Link hinzu und geben dem Inhalt einen Titel.');\n                \/\/document.getElementById('mds-submit').disabled = false;\n                return;\n            }\n            console.log(mds);\n            const size = mds['fileupload-filedata'] ? mds['fileupload-filedata'][0].length * 0.768 : 0;\n            console.log(size \/ 1024 \/ 1024);\n            if((!mds['ccm:wwwurl'] && !mds['fileupload-link']) && !size || size > 1024*1024*100){\n                alert('Die Gr\u00f6\u00dfe von Dateien ist aktuell auf 100MB begrenzt');\n                \/\/document.getElementById('mds-submit').disabled = false;\n                return;\n            }\n             const xhr = new XMLHttpRequest();\n              xhr.open(\"POST\", \"\/scripts\/propose_content.php\", true);\n            \n              \/\/ Tell PHP we're sending JSON\n              xhr.setRequestHeader(\"Content-Type\", \"application\/json\");\n            \n              xhr.onreadystatechange = function () {\n                if (xhr.readyState === 4) {\n                  if (xhr.status === 200) {\n                    console.log(\"Success \/ TODO REDIRECT!\", xhr.responseText);\n                  } else {\n                    console.error(\"Error:\", xhr.status, xhr.responseText);\n                  }\n                }\n              };\n            xhr.send(JSON.stringify({ mds: mds }));\n\n        }\n    }\n            window.addEventListener(\"message\", receiveMessage, false);\n});\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>wlo-search-widget as html wlo-search-widgets as edusharing plugin collectionChips2 collectionChipsOverview wlo formular<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"es_repo_domain":"https:\/\/repository.staging.openeduhub.net\/edu-sharing\/","es_repo_ticket":"","es_plugin_url":"https:\/\/wordpress.openeduhub.de\/wp-content\/plugins","footnotes":""},"categories":[1],"tags":[],"class_list":["post-19","post","type-post","status-publish","format-standard","hentry","category-allgemein"],"_links":{"self":[{"href":"https:\/\/wordpress.openeduhub.de\/index.php?rest_route=\/wp\/v2\/posts\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.openeduhub.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.openeduhub.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.openeduhub.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.openeduhub.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=19"}],"version-history":[{"count":24,"href":"https:\/\/wordpress.openeduhub.de\/index.php?rest_route=\/wp\/v2\/posts\/19\/revisions"}],"predecessor-version":[{"id":46,"href":"https:\/\/wordpress.openeduhub.de\/index.php?rest_route=\/wp\/v2\/posts\/19\/revisions\/46"}],"wp:attachment":[{"href":"https:\/\/wordpress.openeduhub.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.openeduhub.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.openeduhub.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}