JS: Increasing a selection with sibling nodes
<p>I am a bit stuck with this...</p>

<p>Let's say I've got the next HTML structure:</p>

<pre><code>&lt;div id="sourceText" class="cSourceText" contenteditable="true"&gt;
     some text here
     &lt;br&gt;
     some more text here
     &lt;br&gt;
&lt;/div&gt;
</code></pre>

<p>Now, let's say that I have used the js <code>splitText</code> method to store a part of the first text node in a var(i.e. <code>&lt;TextNode textContent="text here"&gt;</code> is stored in <code>var newNode;</code>).</p>

<p>I want to make <code>newNode</code> var to increase with the next sibling nodes until it gets a specified point of a specified text node (wich varies depending on a user selection). Let's say, for our example, I want <code>newNode=&gt;text here &lt;br&gt; some more</code>  at the end so that I can use the jQuery wrapp function to wrap that node with a div.</p>

<p>Is that posible? Or am I going in the wrong direction?</p>
