I am looking for a way, how I can insert a Node at the very beginning of a node, no matter, what there is in (I am making an epub).
Example:
<p>Some test<a href="...">some link</a> Some more text<span id="page_10"></span></p>
Now I want to insert there something, it should look like:
<p><myInsertedNode>My content</myInsertedNode>Some test<a href="...">some link</a> Some more text<span id="page_10"></span></p>
I wanted to use insertBefore, but it doesn't work. because I have to give a Node for it. My "<p>"
does not allways have some inner Notes, but can have them. So the best I could archive, was to insert it before the "<p>"
, but this is not, what I intend to do.