我使用的是最新版本 (4.1),只是尝试了一个基本示例:
<!DOCTYPE html>
<html>
<head><!-- CDN hosted by Cachefly -->
<script src="//tinymce.cachefly.net/4.1/tinymce.min.js"></script>
<script>
tinymce.init(
{
selector:'textarea',
menu : { // this is the complete default configuration
file : {title : 'File' , items : 'newdocument'},
edit : {title : 'Edit' , items : 'undo redo | cut copy paste pastetext | selectall'},
insert : {title : 'Insert', items : 'link media | template hr'},
view : {title : 'View' , items : 'visualaid'},
format : {title : 'Format', items : 'bold italic underline strikethrough superscript subscript | formats | removeformat'},
table : {title : 'Table' , items : 'inserttable tableprops deletetable | cell row column'},
tools : {title : 'Tools' , items : 'spellchecker code'}
}
}
);
</script>
</head>
<body>
<textarea>Your content here.</textarea>
</body>
</html>
出于某种原因,“插入”菜单没有显示在菜单栏中。我还尝试下载包含所有插件的完整包,在 Firefox 和 Chrome 中的结果相同。
最佳答案
我需要将插件行添加到配置中,例如
plugins: [
"advlist autolink lists link image charmap print preview anchor",
"searchreplace visualblocks code fullscreen",
"insertdatetime media table contextmenu paste"
],
关于tinymce - "insert"菜单项未在 tinymce 中显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24373497/