title: How to word wrap text with HTML in it, in javascript?
body: <p>I have a long text, which also has html content in it. something like - </p>
  
  <pre><code>Dell World Newsletter #7 December 3, 2012&lt;br&gt;&lt;br&gt;Dell World is Only One Week Away!&lt;br&gt;The organizers of Dell World are putting the finishing touches on thr ee days of exciting keynotes, sessions and entertainment. Check out the highlights and plan your agenda today.&lt;br&gt;Read more &amp;gt; &lt;a target="_blank" href="http://del.ly/6147p5gd" rel="nofollow" class="has-preview"&gt;http://del.ly/6147p5gd&lt;/a&gt;&lt;br&gt;&lt;br&gt;Modernize Your IT&lt;br&gt;Paul Holland, global sales director of Application Modernization at Dell, talks about the importance of application modernization and the perils organizations face by ignoring the trend. Legacy footprints are affecting an organizations ability&lt;span class="text_exposed_hide"&gt;...&lt;/span&gt;&lt;div class="text_exposed_show"&gt; to be agile in addressing new business needs and implementing new technologies. They are costing organizations a disproportionate amount of money: 80 percent of IT budgets are typically spent maintaining and running these legacy environments.&lt;br&gt;Watch the video &amp;gt; &lt;a target="_blank" href="http://del.ly/6148p5ge" rel="nofollow" class="has-preview"&gt;http://del.ly/6148p5ge&lt;/a&gt;&lt;br&gt;&lt;br&gt;Develop a Cloud Strategy&lt;br&gt;Cloud computing is a key topic of discussion at Dell World 2012. Mark Clifton, director of Global Cloud Solutions Strate gy for Commercial Business at Dell, discusses the cloud strategies and innovations youll learn about at the conference.&lt;br&gt;Read more &amp;gt; &lt;a target="_blank" href="http://del.ly/6149p5g5" rel="nofollow" class="has-preview"&gt;http://del.ly/6149p5g5&lt;/a&gt;&lt;br&gt;&lt;br&gt;Take Control and Simplify Your Data Center&lt;br&gt;I/O virtualization can reduce rack cabling by 80%, lower capital expenses by 40% and lower you operating expenses by 60%. Join NextIO in the Dell World Data Insights Neighborhood Theater at 1pm on Wednesday or in the Cloud Neighborhood Theater at 12:30pm on Thursday to let us show you how. Ask us about our no risk, FREE 30-day try and buy offer&lt;br&gt;&lt;br&gt;Learn more &amp;gt; &lt;a target="_blank" href="http://del.ly/6140p5gg" rel="nofollow" class="has-preview"&gt;http://del.ly/6140p5gg&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Meet and Tweet with Brocade, Emulex and MD3 Storage&lt;br&gt;Join fellow Dell customers and partners for a Meet Up and Tweet Up event at Bar96, from Brocade, Emulex and MD3 Storage! Well be talking all things better together: storage and networking, Fib re Channel, end-to-end management and the hottest sessions at Dell World. Bring a colleague and join the conversation!&lt;br&gt;Join us December 12 from 6-11 p.m. at Bar96 on Rainey Street.&lt;br&gt;Register here &amp;gt; &lt;a target="_blank" href="http://del.ly/6141p5g9" rel="nofollow" class="has-preview"&gt;http://del.ly/6141p5g9&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Time is running out to register for our unique gathering of business leaders, CIOs, industry analysts, consultants and other IT professionals who will share ideas and best practices for making organizations more successful. Reserve your spot today to gain valuable insights on how you can use technology as a tool for innovation at your company.&lt;br&gt;Register Here &amp;gt; ( &lt;a target="_blank" href="http://del.ly/6142p5gi" rel="nofollow" class="has-preview"&gt;http://del.ly/6142p5gi&lt;/a&gt; )&lt;br&gt;&lt;br&gt;&lt;br&gt;NEWS&lt;br&gt;Tech Page One Launches&lt;br&gt;Join us for the launch of Dells Tech Page One, a portal for news and analysis at the intersection of technology, business and culture. Explore content from the best minds at Dell as w ell as leaders and creators from around the globe. Visit the Tech Page One booth inside the Solutions Showcase. www.techpageone.com&lt;br&gt;&lt;br&gt;NEWS&lt;br&gt;Health Check&lt;br&gt;While youre at Dell World, stop by the SoloHealth Station, an interactive, self-service kiosk that screens vision, blood pressure, weight and body mass index in seven minutes or less for free. The kiosk provides an overall health assessment and access to a database of local physicians and actionable health recommendations. The station, available in locations throughout the U.S., was created in partnership with Dells OEM Solutions group. Read more &amp;gt; &lt;a target="_blank" href="http://del.ly/6143p5gc" rel="nofollow" class="has-preview"&gt;http://del.ly/6143p5gc&lt;/a&gt;&lt;br&gt;&lt;br&gt;NEWS&lt;br&gt;Dell Giving Showcase&lt;br&gt;Dell's giving approach is simple: Be a powerful force for change and help connect the youth of today with a more promising tomorrow. The Dell Giving Showcase is an interactive area tha t will educate attendees about the four Dell Strategic Giving programsYouth Learning, Childrens Cancer Care, Social Entrepreneurship and Disaster Reliefwhile also involving the public in a sack-pack-stuffing project to be donated to underprivileged children. Follow Dell Giving on Twitter.&amp;gt; &lt;a target="_blank" href="http://del.ly/6144p5gY" rel="nofollow" class="has-preview"&gt;http://del.ly/6144p5gY&lt;/a&gt;&lt;br&gt;&lt;br&gt;Register Here &amp;gt; ( &lt;a target="_blank" href="http://del.ly/6145p5gl" rel="nofollow" class="has-preview"&gt;http://del.ly/6145p5gl&lt;/a&gt; ) #DellWorld&lt;br&gt;&lt;br&gt;Cant be in Austin December 11-13? Not to worry, attend the premier event virtually. &amp;gt; &lt;a target="_blank" href="http://del.ly/6146p5gm" rel="nofollow" class="has-preview"&gt;http://del.ly/6146p5gm&lt;/a&gt;&lt;/div&gt;&lt;span class="text_exposed_hide text_exposed_link sub-text"&gt;&lt;a href="javascript: void(0)" data-action="expose" class="has-preview"&gt;See More&lt;/a&gt;&lt;/span&gt;
  </code></pre>
  
  <p>Now, this line has text, anchor tags, br tags, and many others.<br></p>
  
  <p>But this is rendered as-
  *</p>
  
  <blockquote>
    <p><br><br>Dell World is Only One Week Away!<br>The organizers of Dell
    World are putting the finishing touches on thr ee days of exciting
    keynotes, sessions and entertainment. Check out the highlights and
    plan your agenda today.<br>Read more &gt; <a href="http://del.ly/6147p5gd" rel="nofollow">http://del.ly/6147p5gd</a><br></p>
  </blockquote>
  
  <p>*</p>
  
  <p><br> Now my question is, 
  I want to wordwrap this line of text so that there are no more than 100 characters  on each line. But the condition is that html tags should be together, as a broken anchor tag would be rendered useless. So, how should i wordwrap this so that html tags stay together while wordwrapping.<br> Please give suggestions.</p>