我正在使用"froala"编辑器将电子邮件模板添加到数据库中,但是"froala"编辑器总是会删除一些HTML标记,例如:
<div [removed]="table-layout:fixed; width: 100%;" class="mailwrapper">
<br>
<table [removed]="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-smooth: always; -webkit-font-smoothing: antialiased; height: 16px; -premailer-height: 16;" align="center" cellpadding="0" cellspacing="0" class="mainTable">
这是我的代码
$(function () {
$('#editor').froalaEditor({
inlineMode: false,
//toolbarInline: true,
charCounterCount: true,
toolbarButtons: ['fontFamily', 'fontSize', 'color', 'paragraphFormat', 'bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript', '|', 'align', 'formatOL', 'formatUL', 'indent', 'outdent', '-', 'insertImage', 'insertLink', 'emoticons', 'insertVideo', 'insertTable', 'undo', 'redo', 'fullscreen', 'html'],
toolbarVisibleWithoutSelection: true,
heightMin: 500,
height: 500,
htmlAllowedTags: ['.*'],
htmlAllowedAttrs: ['.*'],
allowedContent : true
});
});