码迷,mamicode.com
首页 > 其他好文 > 详细

KindEditor编辑器的使用

时间:2016-01-26 01:41:43      阅读:189      评论:0      收藏:0      [点我收藏+]

标签:

1.下载KindEditor编辑器  以KindEditor 4.1.10为例.

2.将下载解压完的KindEditor文件夹放在__ROOT__中.

3.在thinkphp中的Index/index.html中添加以下代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>Document</title>
    <load href="__ROOT__/kindeditor-4.1.10/kindeditor-min.js"/>    //加载kindeditor
    <script>
        KindEditor.ready(function(K) {
            window.editor = K.create(.editor,{
                width:500px, //kindeditor样式
                height:300px,
                //uploadJson :‘__ROOT__/kindeditor-4.1.10/php/upload_json.php‘, //图片上传参数(1).
                //fileManagerJson :‘__ROOT__/kindeditor-4.1.10/php/file_manager_json.php‘, //图片上传参数(2).
                allowFileManager : true,
                resizeType:2, //2或1或0,2时可以拖动改变宽度和高度,1时只能改变高度,0时不能拖动。
                items : [
                fontname, fontsize, |, forecolor, hilitecolor, bold, italic, underline,
                removeformat, |, justifyleft, justifycenter, justifyright
                ] //功能图标
            });
        });
    </script>
</head>
<body>
       <div style="margin-left:50px">
      <
textarea name="content" class="editor"></textarea>
    </
div> </body> </html>

 

KindEditor编辑器的使用

标签:

原文地址:http://www.cnblogs.com/houmin0036/p/5159162.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!