TPhrasing
interface
TPhrasing
{
 Â
attributes
:
Record
<
string
,
string
>
;
 Â
children
:
readonly
Array
<
TNode
>
;
 Â
classes
:
Array
<
string
>
;
 Â
displayName
:
string
;
 Â
domNode
:
null
|
Element
;
 Â
getReactNativeProps
:
(
)
=>
null
|
ReactNativePropsSwitch
;
 Â
id
:
null
|
string
;
 Â
isUnregistered
:
boolean
;
 Â
markers
:
Readonly
<
Markers
>
;
 Â
nodeIndex
:
number
;
 Â
parent
:
null
   Â
|
TBlock
   Â
|
TPhrasing
   Â
|
TDocument
;
 Â
styles
:
TStylesShape
;
 Â
tagName
:
null
|
string
;
 Â
type
:
"phrasing"
;
 Â
getNativeStyles
:
(
)
=>
NativeTextStyles
;
 Â
getWebStyles
:
(
)
=>
Partial
<
WebTextFlowProperties
>
   Â
&
CSSProperties
   Â
&
Partial
<
Pick
<
ViewStyle
,
"position"
>
>
;
 Â
hasClass
:
(
className
:
string
)
=>
boolean
;
 Â
matchContentModel
:
(
contentModel
:
HTMLContentModel
)
=>
boolean
;
 Â
snapshot
:
(
options
?
:
Partial
<
TNodePrintOptions
>
)
=>
string
;
}
@native-html/transient-render-engine
Transient render nodes to be rendered in React Native Text
components. TPhrasing nodes have ​TText
, ​TPhrasing
or
​TEmpty
children.
#
Fieldsattributes
#
attributes
:
Record
<
string
,
string
>
;
Attributes for this tag.
children
#
Children of this node.
classes
#
classes
:
Array
<
string
>
;
A list of classes for this node, extracted from the class attribute of the
underlying ​Node
.
displayName
#
displayName
:
string
;
Used for debugging purposes.
domNode
#
Non-anonymous nodes will hold a reference to a DOM node.
getReactNativeProps
#
Get React Native View
, Text
or mixed View
/Text
props for this ​TNodeShape
.
id
#
id
:
null
|
string
;
The id for this node, extracted from the id attribute of the
underlying ​Node
.
isUnregistered
#
isUnregistered
:
boolean
;
true
when this tag is not a valid HTML tag and there is no custom
renderer for this tag.
markers
#
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
This attribute must be considered immutable. Never try to change it by hand, or you might update the markers of an anscestor! For performance reasons, markers instances might be shared from parent to children when they are equal.
nodeIndex
#
nodeIndex
:
number
;
The position of this element relatively to its parents, after hoisting and collapsing.
parent
#
The parent of this node before hoisting.
Remarks
"Before hoisting" implies that this parent will not match "anonymous" parents.
styles
#
TStyles for this TNode. You should not use these unless required.
Use ​getNativeStyles
instead.
tagName
#
tagName
:
null
|
string
;
The tag name for this node.
Remarks
Anonymous nodes generated during hoisting won't have a tag name. Also, some TText nodes don't have a tagName.
type
#
type
:
"phrasing"
;
The type of this tnode.
#
MethodsgetNativeStyles
#
Get own native styles.
getWebStyles
#
getWebStyles
:
(
)
=>
Partial
<
WebTextFlowProperties
>
 Â
&
CSSProperties
 Â
&
Partial
<
Pick
<
ViewStyle
,
"position"
>
>
;
Get styles that cannot be handled by React Native.
hasClass
#
hasClass
:
(
className
:
string
)
=>
boolean
;
Check if this ​TNode
has the given className
.
#
ParametersclassName
The class to check.
matchContentModel
#
Test if the given content model matches this TNode content model.
#
ParameterscontentModel
The content model to test against.
snapshot
#
Create a JSX string representation of this node and its children.
Remarks
The snapshot is just a representation. For example, it will
print href
as an attribute of the TNode, while if you want to access
href
programatically, you'll need to access it via
tnode.attributes.href
.
#
Parametersoptions
Customize what should be displayed.