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-engine
Markers 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:
#
Fieldsanchor
#
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
ol
and has nool
parents - 0: this node is an
ol
or has oneol
parent - 1: ...
ulNestLevel
#
ulNestLevel
:
number
;
- -1: this node is not an
ul
and has noul
parents - 0: this node is an
ul
or has oneul
parent - 1: ...
#
Methodsextend
#
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.