cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
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
[#macro htmleditor id="" value="" width="100%" height="400px" simple="false" class=""]
 
<link rel="stylesheet" href="${common_static}/static/plugins/kindeditor/themes/default/default.css" />
<script charset="utf-8" src="${common_static}/static/plugins/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="${common_static}/static/plugins/kindeditor/lang/zh_CN.js"></script>
<script type="text/javascript">
 
            var ${id};
            [#if simple=="false"]
            KindEditor.ready(function(K) {
                ${id} = K.create('textarea[name="${id}"]', {
                    width:"${width}",
                    height:"${height}",
                    allowFileUpload : true,
                    uploadJson:"${base}/business/HtmlEditor/image_upload.html",
                    afterBlur: function(){this.sync();},
                    filterMode : false
                });
            });
            [#else]
            KindEditor.ready(function(K) {
                ${id} = K.create('textarea[name="${id}"]', {
                    width:"${width}",
                    height:"${height}",
                    themeType:"simple",
                    allowFileUpload : true,
                    uploadJson:"${base}/business/HtmlEditor/image_upload.html",
                    filterMode : false,
                    resizeType : 0,
                    afterBlur: function(){this.sync();},
                    items : [
                        'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
                        'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', '|', 'emoticons', 
                        'image', 'link']
                });
            });
            [/#if]
            
            
 
</script>
<textarea name="${id}" id="${id}" style="width:${width};height:${height};visibility:hidden;" class="${class}">${value}</textarea>
[/#macro]