国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > 軟件應用 > 正文

kindSoft在線網頁編輯器簡單的配置參數介紹

2024-09-06 19:16:56
字體:
來源:轉載
供稿:網友
對于網頁編輯器對做項目的時候是非常的又用的一個編輯器,大大的減輕了開發人員的負擔,感覺KindSoft是一個不錯的選擇,因此也在不斷的使用。

下面對一些簡單的配置進行歸納一下
首先是將下載的KindSoft文件導入到項目的目錄下;
復制代碼 代碼如下:

<script src="../Content/kindeditor-4.1.4/kindeditor-all.js" type="text/javascript"></script>
<script src="../Content/kindeditor-4.1.4/lang/zh_CN.js" type="text/javascript"></script>

這兩個引用在xx.aspx文件的Head部分
然后插入下面的一段代碼
復制代碼 代碼如下:

<script>
var editor;
KindEditor.ready(function(K) {
editor = K.create('#tbContent');
});
</script>

tbContent是要嵌入的Input標簽的id值,呵呵嘿嘿、、驚喜就出現了;如下圖所示:
 
但是如果要進行圖片、flash或者視頻的上傳的話,你就會很郁悶了,很多時候都會因為上傳路徑不對而出錯,因此你需要設置你的圖片、flash或者視頻文件的路徑;只需將上面一段代碼改為如下部分則可以滿足基本的需求了:
復制代碼 代碼如下:

<script language="javascript" type="text/javascript">
KindEditor.ready(function (K) {
K.create('#tbContent', {
uploadJson: '../Content/kindeditor-4.1.4/asp.net/upload_json.ashx',
fileManagerJson: '../Content/kindeditor-4.1.4/asp.net/file_manager_json.ashx',
allowFileManager: true
});
});

上面標記顏色的部分應該根據自己的文件路徑選擇合適的路徑;
最后就是有關編輯器中的控件并不是自己所需要的,所以你需要在如下的路徑進行配置:
展開kindeditor-4.1.4,找到kindeditor.js文件,雙擊就去,然后找到在246頁左右,就有一個Items,在之后又如下的配置參數:
復制代碼 代碼如下:

[
'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
'anchor', 'link', 'unlink', '|', 'about'
]

參數的解釋如下
sourceHTML代碼
preview預覽
undo后退
redo前進
cut剪切
copy復制
paste粘貼
plainpaste粘貼為無格式文本
wordpaste從Word粘貼
selectall全選
justifyleft左對齊
justifycenter居中
justifyright右對齊
justifyfull兩端對齊
insertorderedlist編號
insertunorderedlist項目符號
indent增加縮進
outdent減少縮進
subscript下標
superscript上標
formatblock段落
fontname字體
fontsize文字大小
forecolor文字顏色
hilitecolor文字背景
bold粗體
italic斜體
underline下劃線
strikethrough刪除線
removeformat刪除格式
image圖片
flashFlash
media視音頻
table表格
hr插入橫線
emoticons插入表情
link超級鏈接
unlink取消超級鏈接
fullscreen全屏顯示
about關于
print打印
code插入程序代碼
mapGoogle地圖
baidumap百度地圖
lineheight行距
clearhtml清理HTML代碼
pagebreak插入分頁符
quickformat一鍵排版
insertfile插入文件
template插入模板
anchor插入錨點
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 万盛区| 宜川县| 台中市| 十堰市| 万安县| 密云县| 鞍山市| 长顺县| 松阳县| 荔波县| 台东市| 昂仁县| 罗平县| 前郭尔| 沛县| 西畴县| 南充市| 江达县| 巴南区| 龙口市| 邳州市| 新化县| 陆丰市| 金湖县| 深圳市| 和田县| 丹东市| 庆元县| 新安县| 新疆| 永寿县| 香河县| 城口县| 双柏县| 梅州市| 孝昌县| 营口市| 缙云县| 昌宁县| 噶尔县| 大英县|