Find out beginning of node and its first child element
Posted: Mon Jan 02, 2023 12:35 pm
Hi Team,
How to find out cursor is at the beginning of the node and also find out the is it first child of element?
Below is the example
Here say suppose my cursor is at <figure> then i should know its beginning of node and say suppose my cursor is at first <para>
then i should know its first child and last child of <figure> how to achieve this?
Example
<figure>
<para>
<paratext>Test</paratext>
<paratext>Test1</paratext>
</para>
<para>
<paratext>Test</paratext>
<paratext>Test1</paratext>
</para>
<figure>
Thanks & Regards
Shilpa.P
How to find out cursor is at the beginning of the node and also find out the is it first child of element?
Below is the example
Here say suppose my cursor is at <figure> then i should know its beginning of node and say suppose my cursor is at first <para>
then i should know its first child and last child of <figure> how to achieve this?
Example
<figure>
<para>
<paratext>Test</paratext>
<paratext>Test1</paratext>
</para>
<para>
<paratext>Test</paratext>
<paratext>Test1</paratext>
</para>
<figure>
Thanks & Regards
Shilpa.P