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

CKEditor 实例

时间:2015-12-24 16:37:59      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:html   js   ckeditor   

1 下载 CKEditor http://ckeditor.com/demo

技术分享

3 index.html

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="js/ckeditor.js"></script>
</head>
<body>

    <textarea id="editor"></textarea>

    <script>
        CKEDITOR.replace( ‘editor‘,{
            width: 800,
            height: 200,
            resize_dir: ‘both‘,
            resize_minWidth: 800,
            resize_minHeight: 200,
            resize_maxWidth: 800,
            resize_maxHeight: 200,
            toolbar :[{name:"image",items:["Image"]},{name:"table",items:["Table"]}] // 设置toolbar
        });
        // 获取内容
        // CKEDITOR.instances["editor"].getData();
        // 获取选中内容
        // CKEDITOR.instances["editor"].getSelectedHtml()
    </script>
</body>
</html>

   

CKEditor 实例

标签:html   js   ckeditor   

原文地址:http://antlove.blog.51cto.com/10057557/1727901

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