1. 程式人生 > >KindEditor 使用方法簡單介紹

KindEditor 使用方法簡單介紹

通常我們寫大段文字需要用到textarea標籤,但是它僅僅能實現純文字編輯,當我們需要上傳的內容有文字和圖片或者視訊表情時,這個時候需要用到富文字外掛來幫我們實現,下面開始介紹KindEditor的實現方法。


1、

下載 KindEditor 最新版本

下載頁面: http://www.kindsoft.net/down.php

2、解壓檔案後,隨便建立index.html檔案,在index.html中引入


< link rel= "stylesheet" href= "themes/default/default.css">


< script src= "kindeditor-all-min.js"></ script> < script src= "lang/zh-CN.js"></ script>

3、

KindEditor. ready( function ( K) { window.editor = K. create( '#editor_id',{ themeType : 'simple'
, allowFileManager: true, uploadJson : '../images/', //要存放圖片等檔案的後臺介面, fileManagerJson : '../manager/images/', afterBlur: function(){ this. sync();} }); html = document. getElementById( 'editor_id').value; window.editor. html
($scope.video.describe); });


4、頁面中顯示如下