Posted By

pedromagalhaes on 02/23/11


Tagged

tinymce


Versions (?)

Hide unwanted html that came from javascript editors (like tinymce, etc.)


 / Published in: jQuery
 

This simple snippet let's you hide unwanted strings inside paragraphs. I use this for text that come from javascript editors like tinymce.

  1. $(document).ready(function(){
  2. $('.div p').each(function(){
  3. $innerHtml = $(this).html();
  4. if($(this).html() == " " || $(this).html() == undefined || $(this).html() == ""){
  5. $(this).hide();
  6. }
  7. });
  8. });

Report this snippet  

You need to login to post a comment.