// Generated by scripts/generate-showcase.mjs. Do not edit directly. page WysiwygEditorDetail { layout = "showcase" state playground_size = ctx.url.searchParams.get("pg_size") ?? "default" state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary" state playground_title = ctx.url.searchParams.get("pg_title") ?? "Project update" state playground_description = ctx.url.searchParams.get("pg_description") ?? "" state playground_items = JSON.parse(ctx.url.searchParams.get("pg_items") ?? "[]") state playground_variant = ctx.url.searchParams.get("pg_variant") ?? "default" state playground_value = ctx.url.searchParams.get("pg_value") ?? "Share progress, decisions, and next steps with your team." state playground_readonly = (ctx.url.searchParams.get("pg_readonly") ?? "false") === "true" state playground_placeholder = ctx.url.searchParams.get("pg_placeholder") ?? "Write something…" state playground_class = ctx.url.searchParams.get("pg_class") ?? "" seo { title = "Wysiwyg Editor" description = "Theme-aware, responsive wysiwyg editor component." } view {
Integrations component

Wysiwyg Editor

Theme-aware, responsive wysiwyg editor component.

10 props1 slots4 outputsTheme readyResponsive
Interactive playground

Configure Wysiwyg Editor

Change any prop and inspect the server-rendered component immediately.

Live preview
Component code
page WysiwygEditorExample {
  state items = []
  view {
    <WysiwygEditor
      title="Project update"
      items="{items}"
      value="Share progress, decisions, and next steps with your team."
    />
  }
}
Event outputInteract with the preview to inspect the typed payload.
Component props10 controls
Live examples

Designed for real product surfaces

Compare configurations and resize the browser to check responsive behavior.

Recommended

Production default

Balanced spacing, hierarchy, and content for the most common product workflow.

01
Live preview
Component usage.wrn
page WysiwygEditorExample {
  state items = []
  view {
    <WysiwygEditor
      title="Project update"
      items="{items}"
      value="Share progress, decisions, and next steps with your team."
    />
  }
}
Dense UI

Compact application

A tighter variation for dashboards, side panels, tables, and operational interfaces.

02
Live preview
Component usage.wrn
page WysiwygEditorExample {
  state items = []
  view {
    <WysiwygEditor
      title="Project update"
      items="{items}"
      value="Share progress, decisions, and next steps with your team."
    />
  }
}
Extended

Rich configuration

A more expressive variation using additional data, stronger emphasis, and optional states.

03
Live preview
Component usage.wrn
page WysiwygEditorExample {
  state items = []
  view {
    <WysiwygEditor
      title="Project update"
      items="{items}"
      value="Share progress, decisions, and next steps with your team."
      readonly="true"
    />
  }
}
Component outputs

Receive every typed component output

Use declarative output handlers in .wrn files or register a direct output handler from JavaScript. The canonical API exposes payload and does not require event.detail.

@inputFires as the editable value changes.
@changeFires when the component's committed value or selection changes.
@focusFires when the interactive control receives focus.
@blurFires when focus leaves the interactive control.
Declarative handlers.wrn
<WysiwygEditor
  @input='console.log(payload)'
  @change='console.log(payload)'
  @focus='console.log(payload)'
  @blur='console.log(payload)'
/>
Direct output handlers.js
import { registerOutputHandler } from "@wrnexus/csr/outputs"

const component = document.querySelector("[data-ui-component=\"WysiwygEditor\"], [data-component=\"WysiwygEditor\"]")

if (component) registerOutputHandler(component, "input", (payload) => {
  console.log("input", payload)
})

if (component) registerOutputHandler(component, "change", (payload) => {
  console.log("change", payload)
})

if (component) registerOutputHandler(component, "focus", (payload) => {
  console.log("focus", payload)
})

if (component) registerOutputHandler(component, "blur", (payload) => {
  console.log("blur", payload)
})
Component API

Props and configuration

All content and behavior shown above is supplied through these props and slots.

PropTypeDefaultRequired
sizestring"default"No
colorstring"primary"No
titlestring"Wysiwyg Editor"No
descriptionstring""No
itemsunknown[][]No
variantstring"default"No
valuestring""No
readonlybooleanfalseNo
placeholderstring"Write something…"No
classstring""No
} }