欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

phpkindeditor使用方法

php kindeditor使用方法:首先下載kindeditor并解壓到項(xiàng)目中;然后刪除不需要的文件夾;最后初始化kindeditor富文本編輯器即可。

創(chuàng)新互聯(lián)公司服務(wù)項(xiàng)目包括阜城網(wǎng)站建設(shè)、阜城網(wǎng)站制作、阜城網(wǎng)頁制作以及阜城網(wǎng)絡(luò)營(yíng)銷策劃等。多年來,我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術(shù)優(yōu)勢(shì)、行業(yè)經(jīng)驗(yàn)、深度合作伙伴關(guān)系等,向廣大中小型企業(yè)、政府機(jī)構(gòu)等提供互聯(lián)網(wǎng)行業(yè)的解決方案,阜城網(wǎng)站推廣取得了明顯的社會(huì)效益與經(jīng)濟(jì)效益。目前,我們服務(wù)的客戶以成都為中心已經(jīng)輻射到阜城省份的部分城市,未來相信會(huì)繼續(xù)擴(kuò)大服務(wù)區(qū)域并繼續(xù)獲得客戶的支持與信任!

推薦:《PHP視頻教程》

下載kindeditor
可以選擇去官網(wǎng)下載(http://kindeditor.net/down.php),不過要翻墻;或者直接CSDNhttp://download.csdn.net/download/dknightl/9813052

下載解壓完放入自己的項(xiàng)目中
在解壓完后可以刪除不需要的文件夾,我是刪除了asp、asp.net、jsp、php,examples可以放到其他地方,用作代碼參考。

初始化kindeditor富文本編輯器


首先先導(dǎo)入下面css和js文件
 <link rel="stylesheet" href="../themes/default/default.css" />
        <script charset="utf-8" src="../kindeditor-min.js"></script>
        <script charset="utf-8" src="../lang/zh_CN.js"></script>
然后初始化(textarea 為富文本編輯器主題,script代碼初始化)
<textarea id="mul_input" name="content" style="width:700px;height:200px;visibility:hidden;display: block;">KindEditor</textarea> 

    <script>
        //簡(jiǎn)單模式初始化
        var editor;
        KindEditor.ready(function(K) {
            editor = K.create('textarea[name="content"]', {
                resizeType : 1,
                allowPreviewEmoticons : false,
                allowImageUpload : false,
                items : [                    'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',                    'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',                    'insertunorderedlist', '|', 'emoticons', 'image', 'link']
            });
        });    </script>

 //默認(rèn)模式        <script>
            var editor;
            KindEditor.ready(function(K) {
                editor = K.create('textarea[name="content"]', {
                    allowFileManager : true
                });
                K('input[name=getHtml]').click(function(e) {
                    alert(editor.html());
                });
                K('input[name=isEmpty]').click(function(e) {
                    alert(editor.isEmpty());
                });
                K('input[name=getText]').click(function(e) {
                    alert(editor.text());
                });
                K('input[name=selectedHtml]').click(function(e) {
                    alert(editor.selectedHtml());
                });
                K('input[name=setHtml]').click(function(e) {
                    editor.html('<h3>Hello KindEditor</h3>');
                });
                K('input[name=setText]').click(function(e) {
                    editor.text('<h3>Hello KindEditor</h3>');
                });
                K('input[name=insertHtml]').click(function(e) {
                    editor.insertHtml('<strong>插入HTML</strong>');
                });
                K('input[name=appendHtml]').click(function(e) {
                    editor.appendHtml('<strong>添加HTML</strong>');
                });
                K('input[name=clear]').click(function(e) {
                    editor.html('');
                });
            });        </script>
    </head>
    <body>
        <h3>默認(rèn)模式</h3>
        <form style="margin: 0;">
            <textarea name="content" style="width:800px;height:400px;visibility:hidden;display: block;">KindEditor</textarea>
            <p>
                <input type="button" name="getHtml" value="取得HTML" />
                <input type="button" name="isEmpty" value="判斷是否為空" />
                <input type="button" name="getText" value="取得文本(包含img,embed)" />
                <input type="button" name="selectedHtml" value="取得選中HTML" />
                <br />
                <br />
                <input type="button" name="setHtml" value="設(shè)置HTML" />
                <input type="button" name="setText" value="設(shè)置文本" />
                <input type="button" name="insertHtml" value="插入HTML" />
                <input type="button" name="appendHtml" value="添加HTML" />
                <input type="button" name="clear" value="清空內(nèi)容" />
                <input type="reset" name="reset" value="Reset" />
            </p>
        </form>
    </body>

獲得內(nèi)容等方法可以參考API
http://kindeditor.net/doc.php

文章名稱:phpkindeditor使用方法
網(wǎng)站網(wǎng)址:http://chinadenli.net/article10/cjeogo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站改版電子商務(wù)App開發(fā)App設(shè)計(jì)微信公眾號(hào)域名注冊(cè)

廣告

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

成都seo排名網(wǎng)站優(yōu)化