是这样的,我把kindeditor封装到了smarty的插件,在另外一个页面中使用引入。
插件:function.html_kindeditor.php
<?phpfunction smarty_function_html_kindeditor(){ $editor1=' <script type="text/javascript"> var editor1; kindeditor.ready(function(k) { var editor1 = k.create(\'textarea[name="content1"]\', { csspath : \'/wxy/view/plugins/code/prettify.css\', uploadjson : \'/wxy/view/upload_json.php\', filemanagerjson : \'/wxy/view/php/file_manager_json.php\', allowfilemanager : true }); prettyprint(); }); </script> <textarea name="content1" style="width:700px;height:200px;" id="content1"></textarea> <input type="button" value="提交" id="subcontents"/> '; return $editor1;}//jquery代码 $("#subcontents").click(function(){ alert("字符串长度:"+($("#content1").val()).length+"类型:"+(typeof $("#content1").val())); });
allowFileManager : true, afterBlur:function(){ this.sync(); }
allowFileManager : true, afterBlur:function(){ this.sync(); }
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号