【发布时间】:2014-01-25 03:07:27
【问题描述】:
我正在为我的一个项目探索微型 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项目中。有人知道这个问题吗?
【问题讨论】:
-
尝试加载正确的缩小版本或仅使用 tinymce.js 并尝试.. 哪个版本的 tinymce 4.x.x?
-
我尝试加载 tinymce.js 但我仍然面临同样的问题。我使用的是 4.0.12 版本。这个问题是否需要任何特定的字符集才能使 unicode 符号可见?
-
我在 tinymce 4.0.5 dev pkg 上,工具栏图标出现,我刚试过.. 版本可能是个问题,我不确定。
-
尝试从github.com/tinymce/tinymce/downloads 下载 4.0.5 但这里没有超过 3.5.8 的版本。同样在发布github.com/tinymce/tinymce/archive/4.0.5.zip 中,我无法找到tinymce.js。我假设您在 4.0.5 是最新版本时下载了 tinymce。
-
那行得通。非常感谢您的帮助。 :-)
标签: javascript tinymce tinymce-4