How to resovled TinyMCE adding tags in WordPress ?


TinyMCE often add inline styles while editing the wordpress post in chrome browser. which messed up the html of site.
for example
<ul>
<li><span style=”line-height: 1.5;”>line 1</span></li>
<li>line 2</li>
<li>line 3</li>
</ul>
Solution :
<script>
jQuery(document).ready(function(){
jQuery(‘.parent-class-name ul li span’).removeAttr(“style”);
});
</script>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s