简体   繁体   中英

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

tinymce.get('article_body').getContent();

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

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',

jsFiddle

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM