CKEditor 인 스 턴 스

1183 단어 htmljsckeditor
1 다운로드 CKEditor http://ckeditor.com/demo
wKiom1Z7nxzRo086AARHaKJogyc620.jpg
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>

   

좋은 웹페이지 즐겨찾기