Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67441

How can I remove input tags from a string using jQuery? This string contains other html tags as well

$
0
0

this is the string:

Hi&nbsp;<input type="text" placeholder="Person&nbsp;Full&nbsp;Name">,<span><br></span><span><br></span><span><span>This is a sample email template for&nbsp;</span></span><input type="text" placeholder="Deal&nbsp;Title">&nbsp;associated with&nbsp;<input type="text" placeholder="Deal&nbsp;Owner"><span><br></span><span><br></span><span><span><br></span></span><span><span><span>Regards,</span></span></span><span><span><span><span><br></span></span></span></span><input type="text" placeholder="Organization&nbsp;Name"><span><br></span><span>dlkgmffkgmkm&nbsp;</span><input type="text" placeholder="">&nbsp; dslkfmlgdmglkfnkl <input type="text" placeholder=""><br>

I am also using an Editor in my textarea.

        $(".btn-removehtml").click(function() {
           html = $('.email-textarea').Editor("getText");
           replaceInput = html.find('input').replaceWith(function() {
                return this.innerHTML;
           }).end().html();
        });

Viewing all articles
Browse latest Browse all 67441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>