首页 > 代码库 > kindeditor-4.1.7应用

kindeditor-4.1.7应用

页面:

<script type="text/javascript" src="http://www.mamicode.com/include/kindeditor/kindeditor.js"></script>

<textarea id="DailySummary" name="DailySummary" style="width:730px;height:110px;visibility:hidden;">{$DAILYCONTENT.worksummary}</textarea>
                    <script>
                      {literal}
                            var dailySummaryEditor;
                            KindEditor.ready(function(K) {
                                dailySummaryEditor = K.create(‘textarea[name="DailySummary"]‘,
                                {
                                    allowFileManager : true,
                                    items : [
                                    ‘source‘, ‘|‘,‘undo‘,‘redo‘,‘print‘, ‘cut‘, ‘copy‘, ‘paste‘,
                                    ‘plainpaste‘, ‘wordpaste‘, ‘|‘, ‘justifyleft‘, ‘justifycenter‘, ‘justifyright‘,
                                    ‘justifyfull‘, ‘insertorderedlist‘, ‘insertunorderedlist‘, ‘indent‘, ‘outdent‘, ‘subscript‘,
                                    ‘superscript‘, ‘|‘, ‘selectall‘, ‘-‘,
                                    ‘title‘, ‘fontname‘, ‘fontsize‘, ‘|‘, ‘textcolor‘, ‘bgcolor‘, ‘bold‘,
                                    ‘italic‘, ‘underline‘, ‘strikethrough‘, ‘removeformat‘, ‘|‘,
                                    ‘advtable‘, ‘hr‘, ‘emoticons‘, ‘link‘, ‘unlink‘ ],
                                    afterBlur:function(){this.sync();}
                                });
                                
                            });
                      {/literal}
                     </script>

 

JS:

获取值判断

if(dailySummaryEditor.html()=="")