clone_page
Turn any web page, including React or Next sites, into an editable WebCake landing page by measuring it in a real browser at desktop and mobile widths so forms, sliders and popups stay interactive.
Instructions
Clones any web page into a Webcake landing page by MEASURING it in a real browser (headless Chrome via Playwright, JavaScript executed — works for React/Vue/Next sites too). The page is loaded at 1200 px and at 420 px; every visible text, image, button, painted box, divider, svg icon and form is recorded with its box, rotation and typography and placed on the landing canvas: desktop boxes scaled onto 960, mobile boxes as measured on 420 (elements the mobile layout hides get config.hide on mobile; mobile-only ones are hidden on desktop). Links become open_link events; fixed elements are pinned; a sticky header becomes the section's native sticky (a-t). Effects, native first: gradients (also gradient text), filters/backdrop blur, rotation and AOS / animate.css / WOW entrance animations map onto native settings; an overflow:hidden box whose content spills out becomes a clipping group (custom_css overflow:hidden); the page's own :hover rules (also ancestor rules like .card:hover img, applied on the element itself) + transitions and its looping CSS animations (@keyframes) become settings.extra_css scoped to #w- (the one thing no native setting covers); icon-font stylesheets go to settings.bhet; self-hosted @font-face fonts to settings.fontGroups. Forms keep every control as its native field (select with options, radio, checkbox-group, textarea, date, file), also forms without a tag. Interactive parts stay interactive, natively: accordions / FAQs (, Bootstrap collapse, aria-expanded panels) become a click→collapse on the question that collapses the answer on load; tab sets ([role=tabpanel], .tab-pane) become a carousel switched by its tab buttons (change_tab); modals hidden on load (.modal, , [role=dialog], .popup…) become landing popups, and the buttons/links that open them get open_popup; #anchor links get scroll_to; sliders (Swiper, Slick, Splide, Owl, Bootstrap carousel, Glide, Flickity, Keen, Embla) become a carousel of slides (hidden slides measured too, library clones skipped); YouTube / Vimeo / become the video element. Multi-colour svgs (logos, illustrations, gradients) become images of themselves; single-colour icons stay native svg masks. The source is validated like a save and cached: the result carries draft_id — save it with create_page({ draft_id, dry_run:false }). Robust to real sites: cookie / consent / newsletter overlays are dismissed (their accept / close clicked) and chat widgets left out before measuring, a fixed site header becomes the sticky first section, app shells that scroll inside a full-height box are unlocked, reveal-on-scroll content is scrolled into its shown state, a tall (also through a lone wrapper div) is split into its sections, overlapping (angled) sections keep their stacking, content clipped by overflow:hidden is cropped (images keep a crop), measured text heights are kept (config.virtualHeight), every colour is rgba(), and desktop/mobile elements are matched by DOM path, else by their text / picture. Approximations: an ancestor :hover fires when the element itself is hovered, other iframes become html-box embeds, content a site renders differently on each load may shift. Needs Playwright on the host (playwright-core + Chrome, or CHROME_BIN). No credentials, no writes.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "clone_page"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public http(s) URL of the page to clone. | |
| html | No | Raw HTML instead of a URL (a saved page / an exported file). Pass base_url so its relative images, stylesheets and fonts load. | |
| name | No | Page name used when the draft is saved with create_page. | |
| base_url | No | With html: the page's original URL — relative assets (images, CSS, fonts) resolve against it, as if the page were loaded from there. |