HtmlRule
Type Stability: stable
selector is a CSS selector tested with el.matches(). priority: higher is tried first (a specific block beats a generic
fallback). filter: an extra test once the selector matches. embed: the element may sit inside the inline content of another
block and is then lifted out as a block of its own. props: props the rule asks fromHTML to set.
Definition
TypeScript
import type { HtmlRule } from '@aionbuilders/nabu/extend';TypeScript
type HtmlRule = {
embed?: boolean;
filter?: (el: Element) => boolean;
priority?: number;
props?: Record<string, any>;
selector: string;
[field: string]: any;
}Properties
| Property | Type | Description |
|---|---|---|
embedoptional | boolean | n/a |
filteroptional | (el: Element) => boolean | n/a |
priorityoptional | number | n/a |
propsoptional | Record<string, any> | n/a |
selector | string | n/a |
Source: src/lib/utils/extensions.js:57