【发布时间】:2013-11-19 08:25:25
【问题描述】:
所以我正在创建一个简单的 CMS 供我自己使用。所以很明显我想用 Tinymce 来编辑我的文本。我试图在一个简单的视图中实现它,但它什么也没返回。控制台中没有错误,但它不会加载 Tinymce。
我遵循了这个简单的 CI 指南:
https://github.com/EllisLab/CodeIgniter/wiki/TinyMCE
所以这是我的简单观点:
<html>
<head>
<title>TEST</title>
<script type="text/javascript" src='<?php echo asset_url()."js/jquery.js" ?>'></script>
<script type="text/javascript" src='<?php echo asset_url()."js/tiny_mce/tiny_mce.js" ?>'>
tinyMCE.init({
theme : "advanced",
mode : "textareas",
plugins : "imagemanager,filemanager,insertdatetime,preview,emotions,visualchars,nonbreaking",
theme_advanced_buttons1_add: 'insertimage,insertfile',
theme_advanced_buttons2_add: 'separator,forecolor,backcolor',
theme_advanced_buttons3_add: 'emotions,insertdate,inserttime,preview,visualchars,nonbreaking',
theme_advanced_disable: "styleselect,formatselect,removeformat",
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
theme_advanced_toolbar_align : "left",
theme_advanced_resize_horizontal : false,
theme_advanced_resizing : true,
apply_source_formatting : true,
spellchecker_languages : "+English=en",
extended_valid_elements :"img[src|border=0|alt|title|width|height|align|name],"
+"a[href|target|name|title],"
+"p,"
invalid_elements: "table,span,tr,td,tbody,font"
});
</script>
</head>
<body>
<textarea>
text..
</textarea>
</body>
</html>
我现在看到的是标准文本区域,而不是 Tinymce 编辑器。由于控制台根本没有给我任何反馈,我有点不知道在哪里寻找问题。
有人有这方面的经验吗?
【问题讨论】:
标签: javascript php codeigniter tinymce