此代码位于head
标记内:
<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
<script>
tinymce.init({
selector: '#editor',
theme: 'modern',
plugins: ['autoresize advlist autolink lists link image charmap hr anchor pagebreak',
'searchreplace visualblocks visualchars code',
'insertdatetime media nonbreaking save table contextmenu directionality',
'emoticons template paste textcolor colorpicker textpattern imagetools'
],
toolbar1: 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image print preview media | forecolor backcolor emoticons',
image_advtab: true,
templates: [
{ title: 'Test template 1', content: 'Test 1' },
{ title: 'Test template 2', content: 'Test 2' }
],
content_css: ['//fast.fonts.net/cssapi/e6dc9b99-64fe-4292-ad98-6974f93cd2a2.css',
'//www.tinymce.com/css/codepen.min.css'
]
});
</script>
控制台:
GET http://fast.fonts.net/cssapi/e6dc9b99-64fe-4292-ad98-6974f93cd2a2.css
有任何帮助吗?
Lorem ipsum dolor sit amet,justo eripuit eos eu。 Ex exo viris facilis imperdiet,quidam pertinacia philosophia
答案 0 :(得分:3)
看起来您在其网站上复制了其中一个TinyMCE演示的代码...如果您没有Fonts.com的帐户,那么在您的应用程序中引用这些字体将导致错误。
您可以在此处详细了解content_css
配置选项的用途:
https://www.tinymce.com/docs/configure/content-appearance/#content_css