Eric Eric - 1 year ago 122
Javascript Question

TinyMCE italic tag not showing

Here's my "constructor"

tinymce.init({selector:"#article_body", valid_elements:'strong/b,italic/i,p,br', formats:{bold:{inline:'b'}, italic:{inline:'i'}}});

Inside TinyMCE editor I can select a piece of text and apply italic and I see the italic result, same with bold. But when I get the content to save it, the italic tag is never there.

This is how I get the content


What do I have to do to make the italic tag working in TinyMCE (v4.2.4) ??

Answer Source

The issue is with the italic/i value in the valid_elements property. Changing it to i/italic solves the problem.

valid_elements: 'strong/b,i/italic,p,br',


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download