如何在一個頁面添加多個不同的kindeditor編輯器

2022-06-10    分類: 網(wǎng)站建設(shè)

或許我們一個頁面有需要用到多個文本編輯器的情況,那我們該怎么辦呢?  
本人查閱了很多資料最后終于找到一種方法,可以通過自定義編輯器的工具欄items屬性,來實現(xiàn):

直接上JS了:

<span class="lspan"><font color="red">*</font>商品信息:</span><%--<span class="lspan"> 
<input id="txtProductInfo" placeholder="請輸入商品信息" value="<%=product.ProductInfo %>" 
                                                name="txtProductInfo"
 type="text" maxlength="25" style="width: 444px" /></span>--%> 
<script type="text/javascript"> 
        KindEditor.ready(function (K) { 
        editor = K.create(’#txtProductInfo’, { 
        cssPath: ’../kindeditorx/plugins/code/prettify.css’, 
        uploadJson: ’../kindeditorx/asp.net/upload_json.ashx’, 
        fileManagerJson: ’../kindeditorx/asp.net/file_manager_json.ashx’, 
        minWidth: 444, 
        minHeight: 200, 
        maxWidth: 444, 
        resizeType: 1, 
        filterMode: false, 
        allowFileManager: true, 
        items: [’source’, ’|’, ’undo’, ’redo’, ’|’, ’justifyleft’, 
’justifycenter’, ’justifyright’, 
               ’justifyfull’, ’insertorderedlist’, ’insertunorderedlist’, 
’indent’, ’outdent’, ’subscript’, ’superscript’, 
                ’clearhtml’, ’quickformat’, ’selectall’, ’|’, 
’fullscreen’, ’|’, ’forecolor’,’hilitecolor’,’bold’,’italic’ 
                ,’underline’,’strikethrough’,’lineheight’,’removeformat’ 
               ] 
        }); 
}); 
</script> 
<textarea id="txtProductInfo" rows="5" cols="" style="width: 400px;">
<%=product.ProductInfo %></textarea>

文章名稱:如何在一個頁面添加多個不同的kindeditor編輯器
文章鏈接:http://www.bm7419.com/news9/165859.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供企業(yè)建站、Google、營銷型網(wǎng)站建設(shè)、定制網(wǎng)站、品牌網(wǎng)站制作、建站公司

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

商城網(wǎng)站建設(shè)