close

先從 nuget上載 (毅可從官網去載) 完整的 Ckeditor

前端引用後取代原本的文字框


 

js取代原本的

    $(document).ready(function () {
        CKEDITOR.replace('要取代的文字框id', {
             height: 200 //這邊可以調整style
        });
    });

自定義工具列面板內容
http://cdn.ckeditor.com/4.5.5/full-all/samples/toolbarconfigurator/index.html#basic
貼去原先資料夾內的config.js

並在下面加上 會主動把html碼 Encode 避免安全問題
config.htmlEncodeOutput = true;

輸出的時候記得在後端 Decode
HttpUtility.HtmlDecode(Content)


完成,真的好用方便~

arrow
arrow
    文章標籤
    Ckeditor .net asp.net
    全站熱搜

    Wood 發表在 痞客邦 留言(0) 人氣()