bhq@iemsoft.cn
2018-11-27 e2b48dac099e43f4b3243cdf19a7522e4b5eccbe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!doctype html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>Custom Theme Examples</title>
        <style>
            form {
                margin: 0;
            }
            textarea {
                display: block;
            }
        </style>
        <script charset="utf-8" src="../kindeditor-min.js"></script>
        <script charset="utf-8" src="../lang/zh_CN.js"></script>
        <script>
            KindEditor.ready(function(K) {
                K.each({ 
                    'plug-align' : {
                        name : '对齐方式',
                        method : {
                            'justifyleft' : '左对齐',
                            'justifycenter' : '居中对齐',
                            'justifyright' : '右对齐'
                        }
                    },
                    'plug-order' : {
                        name : '编号',
                        method : {
                            'insertorderedlist' : '数字编号',
                            'insertunorderedlist' : '项目编号'
                        }
                    },
                    'plug-indent' : {
                        name : '缩进',
                        method : {
                            'indent' : '向右缩进',
                            'outdent' : '向左缩进'
                        }
                    }
                },function( pluginName, pluginData ){
                    var lang = {};
                    lang[pluginName] = pluginData.name;
                    KindEditor.lang( lang );
                    KindEditor.plugin( pluginName, function(K) {
                        var self = this;
                        self.clickToolbar( pluginName, function() {
                            var menu = self.createMenu({
                                    name : pluginName,
                                    width : pluginData.width || 100
                                });
                            K.each( pluginData.method, function( i, v ){
                                menu.addItem({
                                    title : v,
                                    checked : false,
                                    iconClass : pluginName+'-'+i,
                                    click : function() {
                                        self.exec(i).hideMenu();
                                    }
                                });
                            })
                        });
                    });
                });
                K.create('#contentqq', {
                    themeType : 'qq',
                    items : [
                        'bold','italic','underline','fontname','fontsize','forecolor','hilitecolor','plug-align','plug-order','plug-indent','link'
                    ]
                });
            });
        </script>
    </head>
    <body>
        <h3>QQ风格</h3>
        <textarea id="contentqq" name="content" style="width:700px;height:200px;visibility:hidden;"></textarea>
    </body>
</html>