Render pipeline
Sample documentation (demo only)
This is an incomplete, outdated docs snapshot shipped with the playground — screenshots were removed on purpose.
For the full, current manuals go to voodflow.com/docs.
Public and canvas HTML for pages and chrome. Binding/condition/component expansion happens here — not in Blade.
Voodflow\Voodbuilder\Support\Editor\EditorRenderer
- File:
Support/Editor/EditorRenderer.php - Kind:
final class - Responsibility: Turn a published
SitePage.builder_payloadinto public HTML / CSS / JS. - Entry from model:
SitePage::renderedContent()→render();renderedStyles()→css();renderedScripts()→js();pageCssStylesheetUrl()→cssStylesheetUrl().
html(SitePage $page): string
Reads builder_payload['html']. Empty → ''.
Pipeline:
- If page uses chrome shell →
ChromeLayoutManagedContent::stripSiteChromeFromPageHtml stripChromeEditorBleedFromPageHtmlEditorHtmlSanitizer::stripEditorOnlyElements- Nested normalize: sanitize → ThemeToken migrate → LibraryLayout → HeroBackground → CodeBlock → StepTabs →
EditorFormNormalizer::normalizeForPage→ Placeholder EditorBackgroundPublishNormalizer::preferCssBackgrounds(uses CSS fromPageCssArtifactStore::resolveCss)
Does not expand bindings/conditions — that is render().
css(SitePage $page): ?string
ComponentRuntimeBridge::globalClassCss()+componentCssForHtml(...)- If CSS artifact exists on disk → wallpaper overlay remap for public (Grapes wrapper id absent) + sanitize; combine with global/component
- Else resolve published page CSS from payload →
ThemePalette::stripEmbeddedPaletteOverrides→PageSurfaceCssPublish::remapForPublic→EditorCssSanitizer - Return combined string or
null
cssStylesheetUrl(SitePage $page): ?string
Public URL for large stylesheet artifact (PageCssArtifactStore::publicUrl), or null.
js(SitePage $page): ?string
AuthorScriptPolicy::keepOrDiscard— only entitlement consulted on the public render path (pages.custom-js)EditorJsSanitizer::sanitize- Empty →
null
HTML content is intentionally not licence-gated on render (product rule: published sites stay up if licence lapses; author scripts do not).
render(SitePage $page): string
Full body HTML for {!! !!}:
html($page)EditorElementConditionRenderer::renderComponentRuntimeBridge::renderComponentHtmlEditorBindingRenderer::renderEditorDynamicBlockRenderer::renderGlobalTextTags::replaceInHtmlEditorHtmlSecuritySanitizer::sanitize(last gate)
Last gate why: seeders, template imports, revision restore, and direct DB writes reach this method without EditorGate::normalizePayload. Author JS uses js(), so body <script> is never legitimate here.
Voodflow\Voodbuilder\Support\Editor\EditorChromeHtmlPipeline
- File:
Support/Editor/EditorChromeHtmlPipeline.php - Kind:
final class - Responsibility: Same idea as page render for chrome-layout HTML (no
SitePage).
render(string $html, bool $canvasPreview = false): string
stripEditorOnlyElements- sanitize → ThemeToken → CodeBlock → StepTabs → Placeholder
- Conditions with
$page = null ComponentRuntimeBridge::renderComponentHtml($html, null)- Bindings:
renderForEditorif$canvasPreview, elserender EditorDynamicBlockRendererGlobalTextTagsEditorHtmlSecuritySanitizerlast gate (chrome is{!! !!}on every page)
Used by ChromeLayoutRenderer before splitting on data-voodbuilder-content-slot.
Voodflow\Voodbuilder\Support\Editor\EditorCanvas
- File:
Support/Editor/EditorCanvas.php - Kind:
final class - Responsibility: Stylesheet URLs and frame chrome for the GrapesJS iframe (edit mode), not public HTML.
| Signature | Behaviour |
|---|---|
styleUrls(): array |
Canvas stylesheet URLs (Vite + package canvas CSS) |
publishedStyleUrls(): array |
Stylesheets required when a Visual page is published |
resolveViteAsset(string $entry): ?string (protected) |
Resolve built Vite URL for an entry |
toRootRelativeAssetUrl(string $url): ?string |
Same-origin root-relative URL so canvas CSS follows browser host/port when APP_URL differs |
pageBackgroundColor(string $subTheme): string |
Canvas page background for sub-theme |
frameStyle(string $subTheme, bool $popupMode = false): string |
Inline frame chrome CSS |
readPackageCanvasCss(string $filename): string (protected) |
Read package canvas CSS file |
readPopupShellCanvasCss(): string (protected) |
Popup shell CSS from sibling vpopups package when present |
readTabsCanvasCss(): string (protected) |
Tabs canvas CSS |
hasBuiltAsset(string $entry): bool (protected) |
Whether Vite manifest contains entry |
Voodflow\Voodbuilder\Support\Editor\ChromeLayoutContentSlotBlock
- File:
Support/Editor/ChromeLayoutContentSlotBlock.php - Kind:
final class - Responsibility: Editor block definition for the chrome content slot marker (
data-voodbuilder-content-slot).
| Signature | Behaviour |
|---|---|
definition(): EditorBlockDefinition |
Block id/label/category/HTML for the sidebar |