Tuto komponentu použijte, když chcete vložit vyhledávání v adresáři Peppol do prosté stránky HTML bez vytváření vlastní aplikace React.
Skript CDN připojí prvek iframe do vašeho cílového prvku, projde vaším affiliateId a automaticky udržuje výšku rámce synchronizovanou.
Tento náhled používá stejný veřejný zavaděč CDN, jaký bude používat vaše statická stránka.
<!-- 1. Place a target container on your static page -->
<div id="peppol-search-widget"></div>
<!-- 2. Load the widget loader -->
<script src="https://look.pepposh.eu/cdn/peppol-search.js"></script>
<!-- 3. Mount the search widget -->
<script>
pepposhShowSearch({
targetId: "peppol-search-widget",
affiliateId: "YOUR-AFFILIATE-UUID"
});
</script>
Pro jeden widget na stránce můžete přeskočit další vložený skript a nakonfigurovat zavaděč pomocí atributů dat.
<!-- Static page with one widget -->
<div id="peppol-search-widget"></div>
<script
src="https://look.pepposh.eu/cdn/peppol-search.js"
data-target="peppol-search-widget"
data-affiliate-id="YOUR-AFFILIATE-UUID"
></script>
| Field | Required | Description |
|---|---|---|
targetId | yes* | ID of the container element where the iframe should be mounted. |
affiliateId | recommended | Affiliate UUID used for public lookup attribution and rate-limiting protection. |
appBase | no | Base URL of the Peppol app. Defaults to https://look.pepposh.eu. |
height | no | Initial iframe height in pixels before the embedded page reports its measured height. |
target / targetSelector | alternative | Use one of these instead of targetId when you prefer passing a DOM node or CSS selector. |
* Use exactly one of targetId, target, or targetSelector.
pepposhShowSearch({
targetId: "peppol-search-widget",
affiliateId: "YOUR-AFFILIATE-UUID",
// Optional when self-hosting or using another environment
appBase: "https://look.pepposh.eu",
// Optional initial iframe height in pixels
height: 720,
});
Související: Reference koncového bodu vyhledávání a způsoby autorizace.
https://look.pepposh.eu/cdn/peppol-search.jshttps://look.pepposh.eu/embed/peppol-search