tinymce文本编辑器中没有显示工具栏
toolbar not being displayed in tinymce text editor
这是我第一次使用tinymce。我正在遵循他们给出的例子,但它似乎不起作用。我只能看到一个圆角的文本框,没有工具栏和按钮。
我应该添加什么使它正常工作?这是代码:-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org /TR/xhtml11 /DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<script type="text/javascript" src="/js/tinymce/tinymce.min.js" ></script >
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "emotions,spellchecker,advhr,insertdatetime,preview",
// Theme options - button# indicated the row# only
theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,fontselect,fontsizeselect,formatselect",
theme_advanced_buttons2 : "cut,copy,paste,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,|,code,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "insertdate,inserttime,|,spellchecker,advhr,,removeformat,|,sub,sup,|,charmap,emotions",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true
});
</script>
</head>
<body>
<form>
<textarea name="content" cols="50" rows="15" >
This is some content that will be editable with TinyMCE.
</textarea>
</form>
</body>
</html>
目前在主页上下载的是版本4,仍处于测试阶段。您问题中的文档和语法适用于版本3.x。版本4是一个重大的重写,许多旧的语法将不再工作。
你有三个选择:
-
下载3.58版本与文档一起使用。
http://download.moxiecode.com/tinymce/3.5.8/tinymce_3.5.8.zip -
从演示,论坛和他们的小提琴中找出你自己的新版本。
http://fiddle.tinymce.com/ -
等待版本4的稳定发布,因为文档可能会在那时修复。
从版本4开始,你只需要选择器:
tinymce.init({
selector: "textarea"
});
这将给你默认的选项,没有插件。如果你看小提琴,你可以看到一些你可以做的。
相关文章:
- 在某些URL上显示火狐插件工具栏
- 在 Rails 上初始化应用程序 CSS 和 JavaScript 标签时,未显示 FullCalendar 标题工具栏
- KendoUI 工具栏拆分按钮会自动突出显示下拉列表中的第一个选项.如何使所有选项看起来相同
- 当我使用 ckeditor 工具栏时,它会添加 html 标签,而不是在显示时添加所需的效果
- 创建JS工作,但不显示工具栏
- TinyMCE 4在IE9(任何模式)中不显示工具栏图标
- 仅当具有 1 个工具栏的多个编辑器的编辑器处于焦点中时,才显示 TextAngular 工具栏
- 如何在我的WinJS工具栏上显示标签
- 隐藏和显示剑道ui编辑器工具栏
- 外部网格分页工具栏不显示在IE上
- 如何更新web探查器工具栏以显示有关ajax请求的数据
- 如何选择性地显示Chrome扩展'的工具栏图标
- js右侧工具栏未显示
- 删除绑定和CK编辑器工具栏不显示
- 启用/禁用ExtJS面板中基于活动显示的工具栏按钮
- Froala WYISWYG编辑器不显示工具栏
- 如何在 CKEDITOR 内联中禁用自动隐藏/显示工具栏
- tinymce文本编辑器中没有显示工具栏
- 从该工具栏中显示FireFox工具栏'
- IE9的JavaScript问题-当显示开发人员工具栏时没有问题