Markers
interface Markers {Â Â anchor: boolean;Â Â direction: "ltr" | "rtl";Â Â edits: "ins"Â Â Â Â | "del"Â Â Â Â | "none";Â Â lang: string;Â Â olNestLevel: number;Â Â ulNestLevel: number;Â Â extend: () => Markers;Â Â toString: () => string;}@native-html/transient-render-engineMarkers form an abstraction in which one node provides semantic information
to itself and all its descendants. For example, ins elements, which stand
for "insertion" of content in the context of an edit will provide the {
edits: 'ins' } marker to all its descendants.
Remarks
Custom renderers can use markers to change their layout and convey their
semantic meaning. Markers can be derived from attributes, such as lang and
dir attributes, or tag names, such as a, ins, del...
TypeScript users: You can add fields to the ​Markers interface via
module augmentation:
Fields#
anchor#
anchor: boolean;If this node is an a or has one as ancestor, this field will be set to
true.
Default: false
direction#
direction: "ltr" | "rtl";The direction for this content. Follows dir attribute.
https://html.spec.whatwg.org/#the-dir-attribute
Default: 'ltr'
edits#
edits: "ins"Â Â | "del"Â Â | "none";If this node is a del or ins or has either as ancestor, this field
will be set accordingly. Otherwise, it will be set to 'none'.
https://html.spec.whatwg.org/#edits
Default: 'none'
lang#
lang: string;The language for this content. Follows lang attribute.
https://html.spec.whatwg.org/#the-lang-and-xml:lang-attributes
olNestLevel#
olNestLevel: number;- -1: this node is not an
oland has noolparents - 0: this node is an
olor has oneolparent - 1: ...
ulNestLevel#
ulNestLevel: number;- -1: this node is not an
uland has noulparents - 0: this node is an
ulor has oneulparent - 1: ...
Methods#
extend#
Create a new marker instance which extends this markers.
toString#
toString: () => string;Return a string represenation of this marker, including inherited properties from parent markers.