{
  "$schema": "https://next.0build.dev/schema/component.v1.json",
  "accessibility": {
    "aria": [
      {
        "attributes": [],
        "description": "Editor body; no static ARIA attributes.",
        "part": "body"
      },
      {
        "attributes": [
          {
            "name": "aria-label",
            "value": "${label}"
          },
          {
            "name": "aria-pressed",
            "value": "${isActive ? 'true' : 'false'}"
          }
        ],
        "description": "Toolbar button labeled by its tooltip text, `aria-pressed` reflects the active mark/node.",
        "part": "button"
      },
      {
        "attributes": [
          {
            "name": "aria-atomic",
            "value": "true"
          },
          {
            "name": "aria-live",
            "value": "polite"
          }
        ],
        "description": "Word counter: `aria-live` with `aria-atomic` for polite updates.",
        "part": "footer"
      },
      {
        "attributes": [],
        "description": "Header region; no ARIA attributes.",
        "part": "header"
      },
      {
        "attributes": [],
        "description": "Editor root; no static ARIA attributes.",
        "part": "host-inner"
      },
      {
        "attributes": [
          {
            "name": "aria-label",
            "value": "${this.getI18nText('aria-toolbar', this.defaultI18n)}"
          },
          {
            "name": "role",
            "value": "toolbar"
          }
        ],
        "description": "Toolbar: `role=\"toolbar\"` labeled by `aria-toolbar`.",
        "part": "toolbar"
      },
      {
        "attributes": [
          {
            "name": "role",
            "value": "group"
          }
        ],
        "description": "Button group: `role=\"group\"`.",
        "part": "toolbar-group"
      }
    ],
    "notes": [
      "Toolbar buttons expose their state with `aria-pressed`; the word counter updates politely.",
      "The HTML value submits through the hidden form input."
    ]
  },
  "attributes": [
    {
      "default": "''",
      "description": "Custom toolbar as grouped JSON arrays, e.g. `[[\"bold\",\"italic\"],[\"list\"]]`. Items: bold, italic, underline, strikethrough, list, list-ordered, h1–h6, align-left/center/right/justify, blockquote (aliases like `strike` and `bullet-list` are accepted).",
      "from": null,
      "name": "toolbar",
      "property": "toolbar",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "false",
      "description": "Makes the editor non-editable while keeping the toolbar visible.",
      "from": null,
      "name": "readonly",
      "property": "readonly",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "false",
      "description": "Disables the control so it cannot be interacted with.",
      "from": "InputMixin",
      "name": "disabled",
      "property": "disabled",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "''",
      "description": "Associates the hidden form input with a form by id, even when the component sits outside that form.",
      "from": "InputMixin",
      "name": "form",
      "property": "form",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "''",
      "description": "Field name for the hidden form input; array values submit as `name[]`.",
      "from": "InputMixin",
      "name": "name",
      "property": "name",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "''",
      "description": "Placeholder text for the control's empty state.",
      "from": "InputMixin",
      "name": "placeholder",
      "property": "placeholder",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "false",
      "description": "Marks the control as required.",
      "from": "InputMixin",
      "name": "required",
      "property": "required",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "''",
      "description": "Initial value of the control, synchronized with the hidden form input.",
      "from": "InputMixin",
      "name": "value",
      "property": "value",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "''",
      "description": "Per-instance text overrides as `key: text` pairs, merged over the global `z-i18n` script and the built-in defaults.",
      "from": "Hwc",
      "name": "i18n",
      "property": "i18n",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "''",
      "description": "Floating UI placement options (for example `offset` and `shiftPadding`) parsed as `key: value` pairs.",
      "from": "Hwc",
      "name": "floating",
      "property": "floating",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "false",
      "description": "Skips re-rendering after the first render; an existing `data-host-inner` child is adopted as the rendered DOM.",
      "from": "Hwc",
      "name": "force-prevent-rerender",
      "property": "force-prevent-rerender",
      "reflect": false,
      "tokens": null,
      "type": "boolean",
      "values": null
    },
    {
      "default": "''",
      "description": "Selector or id of an external element or `<template>` whose inner content is cloned in place of an inline `template[data-fn=\"template\"]` child.",
      "from": "Hwc",
      "name": "template",
      "property": "template",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "''",
      "description": "Adds classes to named parts as `key: classes` pairs; a plain string targets the default part.",
      "from": "Base",
      "name": "cls",
      "property": "cls",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    },
    {
      "default": "''",
      "description": "Adds inline styles to named parts as `key: styles` pairs; a plain string targets the default part.",
      "from": "Base",
      "name": "stl",
      "property": "stl",
      "reflect": false,
      "tokens": null,
      "type": "string",
      "values": null
    }
  ],
  "category": "inputs",
  "children": [
    {
      "attributes": [
        {
          "description": "Marks the script as configuration (value: `config`).",
          "name": "data-fn",
          "required": true,
          "values": [
            "config"
          ]
        },
        {
          "description": "Re-parses the configuration when the script mutates.",
          "name": "data-reactive",
          "required": false,
          "type": "boolean"
        }
      ],
      "description": "JSON configuration script parsed by the base class (i18n, cls, stl, floating).",
      "element": "script",
      "id": "config",
      "required": false,
      "selector": "script[data-fn=\"config\"][type=\"application/json\"]"
    },
    {
      "attributes": [
        {
          "description": "Marks the select as the data source (value: `data-source`).",
          "name": "data-fn",
          "required": true,
          "values": [
            "data-source"
          ]
        },
        {
          "description": "Re-parses the options when the select mutates.",
          "name": "data-reactive",
          "required": false,
          "type": "boolean"
        }
      ],
      "children": [
        {
          "attributes": [
            {
              "description": "Group header text; also the default group key.",
              "name": "label",
              "required": true,
              "type": "string"
            },
            {
              "description": "Disables every option in the group.",
              "name": "disabled",
              "required": false,
              "type": "boolean"
            },
            {
              "description": "Overrides the group key used in the parsed data.",
              "name": "data-key",
              "required": false,
              "type": "string"
            },
            {
              "description": "Comma-separated keywords stored with the group's data.",
              "name": "data-keywords",
              "required": false,
              "type": "comma-separated string"
            }
          ],
          "children": [
            {
              "attributes": [
                {
                  "description": "Value carried by this option in the parsed data.",
                  "name": "value",
                  "required": false,
                  "type": "string"
                },
                {
                  "description": "Makes the option non-selectable.",
                  "name": "disabled",
                  "required": false,
                  "type": "boolean"
                },
                {
                  "description": "Marks the option as initially selected.",
                  "name": "selected",
                  "required": false,
                  "type": "boolean"
                },
                {
                  "description": "Extra search terms, comma-separated; searched alongside the label and value.",
                  "name": "data-keywords",
                  "required": false,
                  "type": "comma-separated string"
                }
              ],
              "description": "One option entry within the group.",
              "element": "option",
              "repeatable": true
            }
          ],
          "description": "Groups options under a label.",
          "element": "optgroup",
          "repeatable": true
        },
        {
          "attributes": [
            {
              "description": "Value carried by this option in the parsed data.",
              "name": "value",
              "required": false,
              "type": "string"
            },
            {
              "description": "Makes the option non-selectable.",
              "name": "disabled",
              "required": false,
              "type": "boolean"
            },
            {
              "description": "Marks the option as initially selected.",
              "name": "selected",
              "required": false,
              "type": "boolean"
            },
            {
              "description": "Extra search terms, comma-separated.",
              "name": "data-keywords",
              "required": false,
              "type": "comma-separated string"
            }
          ],
          "description": "One ungrouped option entry.",
          "element": "option",
          "repeatable": true
        }
      ],
      "description": "Hidden select parsed into grouped option data by the base class.",
      "element": "select",
      "id": "data-source",
      "required": false,
      "selector": "select[data-fn=\"data-source\"]"
    },
    {
      "attributes": [
        {
          "description": "Marks the template as an icon source (value: `icons`).",
          "name": "data-fn",
          "required": true,
          "values": [
            "icons"
          ]
        },
        {
          "description": "Re-parses the icons when the template mutates.",
          "name": "data-reactive",
          "required": false,
          "type": "boolean"
        }
      ],
      "children": [
        {
          "attributes": [
            {
              "description": "Icon key referenced by `$icons`.",
              "name": "data-key",
              "required": true,
              "type": "string"
            }
          ],
          "description": "One icon element.",
          "element": "*",
          "repeatable": true
        }
      ],
      "description": "Instance-level icon repository.",
      "element": "template",
      "id": "icons",
      "required": false,
      "selector": "template[data-fn=\"icons\"]"
    },
    {
      "attributes": [
        {
          "description": "Marks the template for deferred mounting (value: `template`).",
          "name": "data-fn",
          "required": true,
          "values": [
            "template"
          ]
        },
        {
          "description": "Re-parses the template when it mutates.",
          "name": "data-reactive",
          "required": false,
          "type": "boolean"
        }
      ],
      "description": "Deferred content template mounted by the base class.",
      "element": "template",
      "id": "template",
      "required": false,
      "selector": "template[data-fn=\"template\"]"
    },
    {
      "attributes": [
        {
          "description": "Marks the template as the initial value (value: `value`).",
          "name": "data-fn",
          "required": true,
          "values": [
            "value"
          ]
        },
        {
          "description": "Re-reads the initial content when the template mutates.",
          "name": "data-reactive",
          "required": false,
          "type": "boolean"
        }
      ],
      "description": "Initial HTML content template (`<template data-fn=\"value\">`).",
      "element": "template",
      "id": "value",
      "required": false,
      "selector": "template[data-fn=\"value\"]"
    }
  ],
  "cssClasses": [],
  "cssVars": [],
  "dataHooks": [
    {
      "appliesTo": "descendant",
      "attribute": "data-disabled",
      "description": "Set while the control is disabled.",
      "role": "marker",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-host-inner",
      "description": "Marks the rendered inner wrapper so `force-prevent-rerender` can adopt server-rendered DOM without re-rendering.",
      "from": "Hwc",
      "role": "config",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-part",
      "description": "Marks the editor body in adopted server-rendered DOM (`data-part=\"body\"`).",
      "role": "marker",
      "values": [
        "body"
      ]
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-reactive",
      "description": "Opts the marked child (config script, data source, icons, or template) into live re-parsing when its DOM mutates.",
      "from": "Hwc",
      "role": "config",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-readonly",
      "description": "Set while the editor is read-only.",
      "role": "marker",
      "values": []
    },
    {
      "appliesTo": "descendant",
      "attribute": "data-tooltip",
      "description": "Tooltip text on toolbar buttons (consumed by the tooltip singleton).",
      "role": "marker",
      "values": []
    }
  ],
  "events": [
    {
      "bubbles": true,
      "cancelable": false,
      "description": "Fires when the content changes; `detail.value` carries the HTML string.",
      "detail": {
        "fields": [
          {
            "name": "value",
            "type": "string | string[]"
          }
        ],
        "type": "{ value: string | string[] }"
      },
      "from": "InputMixin",
      "name": "z-rte:input"
    }
  ],
  "i18n": [
    {
      "default": "Rich text editor",
      "description": "Accessible label of the editable region.",
      "key": "aria-editor",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "Formatting options",
      "description": "Accessible label of the toolbar.",
      "key": "aria-toolbar",
      "placeholders": [],
      "usedIn": [
        "toolbar"
      ]
    },
    {
      "default": "Align Center",
      "description": "Align center button tooltip.",
      "key": "tooltip-align-center",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "Align Justify",
      "description": "Align justify button tooltip.",
      "key": "tooltip-align-justify",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "Align Left",
      "description": "Align left button tooltip.",
      "key": "tooltip-align-left",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "Align Right",
      "description": "Align right button tooltip.",
      "key": "tooltip-align-right",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "Blockquote",
      "description": "Blockquote button tooltip.",
      "key": "tooltip-blockquote",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "Bold",
      "description": "Bold button tooltip.",
      "key": "tooltip-bold",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "Heading 1",
      "description": "Heading 1 button tooltip.",
      "key": "tooltip-h1",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "Heading 2",
      "description": "Heading 2 button tooltip.",
      "key": "tooltip-h2",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "Heading 3",
      "description": "Heading 3 button tooltip.",
      "key": "tooltip-h3",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "Heading 4",
      "description": "Heading 4 button tooltip.",
      "key": "tooltip-h4",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "Heading 5",
      "description": "Heading 5 button tooltip.",
      "key": "tooltip-h5",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "Heading 6",
      "description": "Heading 6 button tooltip.",
      "key": "tooltip-h6",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "Italic",
      "description": "Italic button tooltip.",
      "key": "tooltip-italic",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "List",
      "description": "Bullet list button tooltip.",
      "key": "tooltip-list",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "Ordered List",
      "description": "Ordered list button tooltip.",
      "key": "tooltip-list-ordered",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "Strikethrough",
      "description": "Strikethrough button tooltip.",
      "key": "tooltip-strikethrough",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "Underline",
      "description": "Underline button tooltip.",
      "key": "tooltip-underline",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "words",
      "description": "Word counter plural unit.",
      "key": "word-counter-plural",
      "placeholders": [],
      "usedIn": []
    },
    {
      "default": "word",
      "description": "Word counter singular unit.",
      "key": "word-counter-singular",
      "placeholders": [],
      "usedIn": []
    }
  ],
  "icons": [],
  "id": "rte",
  "inherits": [
    "InputMixin",
    "Hwc",
    "Base"
  ],
  "keyboard": [
    {
      "action": "TipTap shortcuts for bold/italic/underline inside the editor.",
      "keys": [
        "Mod+B",
        "Mod+I",
        "Mod+U"
      ]
    }
  ],
  "kind": "hwc",
  "methods": [],
  "notes": [
    "TipTap is an optional dependency loaded by the editor pack; there is no kit CSS layer — style via the parts.",
    "Toolbar buttons carry `data-tooltip`, so the shared tooltip singleton shows their labels on hover/focus."
  ],
  "parts": {
    "defaultClsTarget": "host-inner",
    "defaultStlTarget": "host-inner",
    "items": [
      {
        "defaultCls": "z-rte-body",
        "description": "Editor body wrapper (default `z-rte-body`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "body",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "z-button z-button-default z-button-icon z-button-xsmall",
        "description": "Toolbar button (default `z-button z-button-default z-button-icon z-button-xsmall`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "button",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "",
        "description": "The editable content region.",
        "foundIn": [
          "$cls"
        ],
        "key": "editor",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "z-rte-footer",
        "description": "Footer region with the word counter (default `z-rte-footer`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "footer",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "z-rte-header",
        "description": "Header region above the toolbar.",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "header",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "z-rte",
        "description": "Editor root (default `z-rte`); the default `cls`/`stl` target.",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "host-inner",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "z-rte-toolbar",
        "description": "The toolbar (default `z-rte-toolbar`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "toolbar",
        "supportsCls": true,
        "supportsStl": true
      },
      {
        "defaultCls": "z-rte-toolbar-group",
        "description": "One toolbar button group (default `z-rte-toolbar-group`).",
        "foundIn": [
          "$cls",
          "render"
        ],
        "key": "toolbar-group",
        "supportsCls": true,
        "supportsStl": true
      }
    ]
  },
  "recipes": [],
  "related": [
    "input-tag"
  ],
  "schemaVersion": 1,
  "sources": {
    "css": [],
    "cssSelectors": [],
    "ts": "src/js/hwc/components/rte.ts"
  },
  "summary": "TipTap-based rich text editor with a configurable grouped toolbar, word counter, and HTML value submission.",
  "tag": "z-rte",
  "title": "Rich Text Editor"
}
