Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/406.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript tinymce文本编辑器中未显示工具栏_Javascript_Tinymce_Text Editor - Fatal编程技术网

Javascript tinymce文本编辑器中未显示工具栏

Javascript tinymce文本编辑器中未显示工具栏,javascript,tinymce,text-editor,Javascript,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

我第一次使用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>

tinyMCE.init({
模式:“文本区域”,
主题:“高级”,
插件:“情感,拼写检查,advhr,insertdatetime,预览”,
//主题选项-按钮#仅指示行#
主题_高级_按钮1:“新建文档,|,粗体,斜体,下划线,|,左对齐,中间对齐,右对齐,字体选择,字体大小选择,格式选择”,
主题|高级|按钮2:“剪切、复制、粘贴、|、布条、纽姆利斯特、|、凸出、缩进、|、撤消、重做、|、链接、取消链接、锚定、图像、|、代码、预览、|、前景色、后景色”,
theme_advanced_按钮3:“插入日期、插入时间、|、拼写检查、advhr、removeformat、|、sub、sup、|、charmap、情感”,
主题\高级\工具栏\位置:“顶部”,
主题\高级\工具栏\对齐:“左”,
主题\高级\状态栏\位置:“底部”,
主题\u高级\u大小调整:正确
});
这是一些可以用TinyMCE编辑的内容。

主页上当前的下载版本是第4版,目前仍处于测试阶段。您问题中的文档和语法适用于3.x版。版本4是一个主要的重写,许多旧语法将不再工作

您有三种选择:

  • 下载3.58版与文档一起使用。

  • 从演示、论坛和他们的小提琴中自己找出新版本。

  • 等待版本4的稳定发布,因为届时文档可能会被修复

开始使用版本4所需的只是选择器:

tinymce.init({
    selector: "textarea"
});

这将为您提供没有插件的默认选项。如果你看小提琴,你可以看到一些你可以做的事情。

你检查过图像参考吗?不,你的意思是:-视觉表格类别:“myCustomVisualAidTableClass”不,我是指图像的路径。在你的配置文件中检查。我找不到任何配置文件。我有4个文件夹:lang、plugin、skin、theme和tinymce.min.js文件。你有js错误吗?