Subject: How to split text element to separate spans?
From: Israel Viente <israel.viente@xxxxxxxxx>
Date: Sun, 6 Jun 2010 18:42:25 +0300
|
Hi,
I have a problem splitting spans with text elements separated by br,
to different spans with br in between them.
Example Input:
<p dir="ltr"><span class="smaller">text1
<br />
text2
text3.
<br />
</span> <span class="smalleritalic">no</span> <span
class="smaller">problems.
<br />
<br />
</span></p>
Desired output:
<p dir="ltr"><span class="smaller">text1</span>
<br />
<span class="smaller">text2 text3.</span>
<br />
<span class="smalleritalic">no</span> <span
class="smaller">problems.</span>
<br />
<br />
</p>
Note: I need to create new span and preserve the span class when br
breaks inside a span.
Thanks for any idea.
Israel
|