我刚刚在tinymce中添加了字体大小选项。在html编辑器中,它显示正确更改的字体大小,但它不保存更改的内容。我不认为xss过滤是问题,因为其他格式化工作(粗体,斜体,......)。
我像这样初始化tinymce
<script type="text/javascript">
tinymce.init({
selector: "textarea", theme: "modern", width: 930, height: 300,
plugins: [
"advlist autolink link image lists charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
"table contextmenu directionality emoticons paste textcolor responsivefilemanager"
],
toolbar1: "undo redo | bold italic underline | sizeselect | fontsizeselect | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect",
toolbar2: "| responsivefilemanager | link unlink anchor | image media | forecolor backcolor | print preview code ",
image_advtab: true,
external_filemanager_path: "/Scripts/filemanager/",
filemanager_title: "Responsive Filemanager",
external_plugins: {"filemanager": "/Scripts/filemanager/plugin.min.js"}
});
</script>