jquery - Get all content from bootstrap #editor div -


After using my bootstrap editable div, I have something like:

  & Lt; Span & gt; Simple text & lt; u & gt; Hello! & Lt; / u & gt; Second lesson & lt; / Span & gt; Whatever I need - get all the text from the div, but if I use this recursive function, its return is only with the content of the elements, but the text is "simple" Text "and" second text "are removed from this function.  
  function parseElem (e) {var r = ''; If (E. Children ('*'). Size ()> 0) {E.K. Children ('*') Each (function () {r + = parseElem ($ (this));}); Return r; } else {return e.html (). Replace ('& lt; br & gt;', '\ n'); }}   

and if I have

  & lt; Span & gt; He said that & lt; P & gt; Ll & lt; / P & gt; Oh! & Lt; P & gt; & Lt; Period & gt; This & lt; I & gt; Is & lt; / I & gt; Original & lt; / Span & gt; Example & lt; / P & gt; & Lt; / Span & gt;   

I want to leave the stroke I tagged in the return value.

This should filter your period content for your needs. Just add any tag that you : not () selector

  $ ('span') do not want to be unwrapped. (': Not (b, i, u)'). material (). to open ();    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -