简体   繁体   中英

CKEditor always add inline css 'font-size' and 'font-family' to source in CKEDitor

In the settings of CKEditor (ver 4.5.11) I have added a default font called 'Trebuchet MS' with a sizing of '16px'. I then save the value of the textarea in an database table.

Then when I want to use the html text saved in the table as the body of an E-mail. If I check the html saved in the table I get this html code:

<h1><em>Lorem ipsum dolor sit amet, consectetur adipisicing elit, </em></h1>

<p>&nbsp;</p>

<h3><em>sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </em></h3>

<p>&nbsp;</p>

<p><em>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </em></p>

The problem here is that if you send this by email, the emailprogram or website uses just a default font. Is there a way to always push something like:

style="font-family: 'Trebuchet MS'; font-size: 16px;"

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