ElementorexCms.Components (ElementorexCms v0.1.0)

Copy Markdown View Source

Components to show documents on your site.

import ElementorexCms.Components

<.document document={@page.body} />

The document is normalized (see ElementorexCms.Document.normalize/2) and rendered with its stylesheet. Blocks use daisyUI 5 and Tailwind classes, so your Tailwind build has to scan the library (see the README).

Summary

Functions

Renders a document.

Functions

document(assigns)

Renders a document.

Attributes

  • document - the document map (nil renders nothing)
  • registry - blocks to use (default ElementorexCms.Registry.default/0)
  • data - extra data for blocks that need it (@ctx.data in the block)
  • class - classes for the root element

Attributes

  • document (:map) - Defaults to nil.
  • registry (:any) - Defaults to nil.
  • data (:map) - Defaults to %{}.
  • mode (:atom) - Defaults to :public. Must be one of :public, or :editor.
  • class (:any) - Defaults to nil.