使用CKEditor編輯器進行文本編輯,ckeditor文本編輯

來源:互聯網
上載者:User

使用CKEditor編輯器進行文本編輯,ckeditor文本編輯

首先下載CKEditor。

:點擊開啟連結

將下載完的CKEditor解壓並且匯入到項目中。

然後在頁面引入CKEditor

<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
在要編輯的textarea標籤中加入class=“ckeditor” 並加入相應的id和name屬性

<textarea rows="10" cols="20" id="editor1" name="editor1" class="ckeditor"></textarea>
然後在伺服器運行即可使用CKEditor

效果




誰會使用FCKeditor文字編輯器?

呵呵 .....還真是及時!我剛剛就用了一個.....
先下一個FCKeditor 3.2的包,然後解壓
在調用檔案<script type="text/javascript" src="....ckeditor.js"></script> 你解壓包地址
在你要放編輯器的地方插入文本域
<textarea id="editor" name="content" class="ckeditor"></textarea>
你試試...
 
教用過網頁文字編輯器ckeditor的,我怎擷取文本域的的值,然後插入到資料庫?

就是。
var data = CKEDITOR.instances.你編輯器的id.getData()
提交到後台
String value = request.getParameter("")
不管用什麼架構,其實都是最基本的getParameter的封裝
不過你傳值的時候要先encodeURI(data),後台再URLDecoder.decode(value, "utf-8"),否則特殊字元傳輸會有問題
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.