Ask the assistant
0/400
Your question is processed by an AI service and kept to improve answers. Do not enter personal data.

    HtmlEmbed

    Your own HTML on a site page: a map, a booking form, a payment button — one file from the project's data/web/html/ , shown inline.

    Type: leaf Web only: in the app the element shows nothing and loads nothing.

    HtmlEmbed src:"data/web/html/booking.html" height:520 requiresConsent:"marketing"

    Parameters

    Parameter Type Default Description
    src string — The embed file, as a full path from the project root : data/web/html/… . External addresses are not accepted
    requiresConsent "analytics" | "marketing" — Consent category: the embed waits until that category is allowed (see Consent )
    isolate bool false Load the file into a sandboxed iframe instead of parsing it into the page
    width , height length — Block size. Always set the height: the file arrives after the page, and without it the block is empty at first and then pushes down everything below it

    How it works

    In place of the element the page leaves an empty block and fills it with the file's content after loading, in order from top to bottom. Scripts inside the file run.

    Where the embed works is the same as for Script : on the site's own addresses — <slug>.reeel.site and a connected domain; under the platform's addresses ( *.app.reeel.dev and others) the embed is not loaded and the block stays empty.

    Isolation: isolate:true

    By default the file is parsed right into the page : its scripts see everything the page sees — including the storage with the Session token — and styles leak both ways. isolate:true shows the file in an <iframe sandbox="allow-scripts allow-forms allow-popups"> : the embed gets its own origin and sees neither the page's storage, nor its cookies, nor its DOM.

    HtmlEmbed src:"data/web/html/chat.html" isolate:true height:480

    The price: the frame does not grow with its content ( height is required; without width it takes the whole line), the embed cannot draw outside its block and has no storage of its own. For anything third-party this is the right mode.

    Examples

    An external widget in one file

    data/web/html/map_widget.html
    HtmlEmbed src:"data/web/html/map_widget.html" height:360
    HtmlEmbed src:"data/web/html/booking.html" height:520 requiresConsent:"marketing"

    The block waits for the marketing category just as Script does — and is filled without a reload once the visitor allows it.

    Rules

    • MUST file is a bare name inside data/web/html/ ; relative paths and schemes are rejected, as with Script src: .
    • MUST A widget that sets third-party cookies or pulls in trackers goes with requiresConsent .
    • MUST NOT Do not expect the embed on a platform address — it is deliberately not loaded there.

    See also

    • Script — your own JavaScript on the page
    • Consent — the consent banner and categories