Home >Backend Development >PHP Tutorial >大家帮忙看看~ThinkPHP无法加载kindeditor编辑器咋回事啊有贴代码
大家帮忙看看~~ThinkPHP无法加载kindeditor编辑器怎么回事啊????有贴代码。
最近做东西需要用ThinkPHP调用kindeditor,我直接打开Tpl文件夹中的html文件编辑器正常显示,可是当我输入网址
localhost/app/index.php/editor时,html页面也能显示,但是textarea无法显示成kindeditor页面!!
<br /><html><br /> <head><br /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><br /> <title>添加</title> <br /> <link rel="stylesheet" href="../Public/kindeditor/themes/default/default.css" /><br /> <link rel="stylesheet" href="../Public/kindeditor/plugins/code/prettify.css" /><br /> <script charset="utf-8" src="../Public/kindeditor/kindeditor.js"></script><br /> <script charset="utf-8" src="../Public/kindeditor/lang/zh_CN.js"></script><br /> <script charset="utf-8" src="../Public/kindeditor/plugins/code/prettify.js"></script><br /> <script><br /> var editor1;<br /> KindEditor.ready(function(K) {<br /> editor1 = K.create('textarea[name="content"]', {<br /> cssPath : '../Public/kindeditor/plugins/code/prettify.css',<br /> uploadJson : '../Public/kindeditor/php/upload_json.php',<br /> fileManagerJson : '../Public/kindeditor/php/file_manager_json.php',<br /> allowFileManager : true,<br /> afterCreate : function() {<br /> var self = this;<br /> K.ctrl(document, 13, function() {<br /> self.sync();<br /> K('form[name=content]')[0].submit();<br /> });<br /> K.ctrl(self.edit.doc, 13, function() {<br /> self.sync();<br /> K('form[name=content]')[0].submit();<br /> });<br /> }<br /> });<br /> prettyPrint();<br /> });<br /> </script><br /> </head><br /> <body><br /> <div><br /> <form method="post" name="add" action="__URL__/add"><br /> 标题:<input type="text" name="title" /><br /><br /> 类型:<select name="type"><br /> <option value="1">--类型1--</option><br /> <option value="2">--类型2--</option><br /> </select><br /><br /> 内容: <textarea name="content" style="width:700px;height:200px;" >在这里添加内容</textarea><br /><br /><br /> <input type="submit" name="button" value="提交内容" /><br /> <input type="reset" name="reset" value="重 置"><br /> </form><br /> </div><br /> </body><br /></html><br />