TinyMCE:工具栏图标未出现

问题描述 投票:6回答:7

我正在为我的一个项目探索微型mce编辑器,但发现工具栏中的图标没有出现。它显示了浏览器无法显示的一些unicode。这是页面的html代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/ht/loose.dtd">
<html>
<head>
<title>HTML</title>
<script type="text/javascript" src="../js/tinymce/tinymce.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript">
tinymce.init({
        selector: "textarea",
        plugins: [
                "advlist autolink autosave link image lists charmap print preview hr anchor pagebreak spellchecker",
                "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
                "table contextmenu directionality emoticons template textcolor paste fullpage textcolor"
        ],

        toolbar1: "newdocument fullpage | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | styleselect formatselect fontselect fontsizeselect",
        toolbar2: "cut copy paste | searchreplace | bullist numlist | outdent indent blockquote | undo redo | link unlink anchor image media code | inserttime preview | forecolor backcolor",
        toolbar3: "table | hr removeformat | subscript superscript | charmap emoticons | print fullscreen | ltr rtl | spellchecker | visualchars visualblocks nonbreaking template pagebreak restoredraft",

        menubar: false,
        toolbar_items_size: 'small',

        style_formats: [
                {title: 'Bold text', inline: 'b'},
                {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
                {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
                {title: 'Example 1', inline: 'span', classes: 'example1'},
                {title: 'Example 2', inline: 'span', classes: 'example2'},
                {title: 'Table styles'},
                {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
        ],

        templates: [
                {title: 'Test template 1', content: 'Test 1'},
                {title: 'Test template 2', content: 'Test 2'}
        ]
});</script>
</head>
<body>
<form method="post" action="somepage">
    <textarea name="content" style="width:100%"></textarea>
</form>
</body>
</html>

另一方面,如果我将脚本替换为

<script type="text/javascript" src="http://tinymce.cachefly.net/4.0/tinymce.min.js"></script>

我能够完美地看到所有图标。我已将tinymce下载中所有js的内容添加到js文件夹中的Web项目中。是否有人对此问题有任何线索?

javascript tinymce tinymce-4
7个回答
4
投票

不要将js文件夹放在外面太远..... “在此处输入图像说明”

将引荐文件夹(tinymce)与html(或其可能是什么)文件放在一起时解决了问题...图片说明在这里“>


4
投票

对于将来遇到相同问题的人:还要检查您的.htaccess不会阻止以下扩展名:


4
投票

我遇到了同样的问题,.htaccess和其他内容对我不起作用。...


2
投票

好,我让这个工作了。


1
投票

对于将来会遇到相同问题的人,第2集(请参阅我之前为第1集提供的答案):


0
投票

Tinymce 4使用CSS的Content属性呈现工具栏图标


0
投票

[如果有帮助,我将TinyMCE与HTML / PHP结合使用,并使用Bootstrap 3。具有行和容器流体的div使我的图标不显示。

© www.soinside.com 2019 - 2024. All rights reserved.