---
# System prepended metadata

title: 文字編輯器 ckeditor
tags: [火箭]

---

# 文字編輯器 ckeditor
###### tags: `火箭`

# 檔案放在github prodectadmin master
CKEditor與CKFinder的設定

參考網址：https://blog.xuite.net/tolarku/blog/229329277-%5BAsp.net%5D+%E4%BD%BF%E7%94%A8+CKEditor+%2B+CKFinder+%E6%8F%90%E4%BE%9B+WYSIWYG+%E7%B6%B2%E9%A0%81%E5%85%A7%E5%AE%B9%E7%B7%A8%E8%BC%AF%E5%99%A8

檔案版本：
CKEditor 4.4.3 Full 版
從NuGet安裝

CKFinder  ckfinder_aspnet_2.4.1
https://ckeditor.com/ckfinder/changelog/

關鍵：CKFinder.dll要加入參考


如何改成class？
CKEDITOR.editorConfig = function( config )的設定：
https://ckeditor.com/old/forums/Support/ckfinder-class

config.ascx中
public override void SetConfig()

BaseUrl ="~/Uploads/";     //使用相對路徑

BaseDir ="";  //不需填寫


有時CKFinder無法出現，需要清除瀏覽器快取。



CKEDITOR.replace('TextBox1',
{
     filebrowserBrowseUrl: '/Scripts/ckfinder/ckfinder.html',
     filebrowserImageBrowseUrl: '/Scripts/ckfinder/ckfinder.html?type=Images',
     filebrowserFlashBrowseUrl: '/Scripts/ckfinder/ckfinder.html?type=Flash',
     filebrowserUploadUrl: '/Scripts/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files',
     filebrowserImageUploadUrl: '/Scripts/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images',
     filebrowserFlashUploadUrl: '/Scripts/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash'
});

# MVC
 //通過Html標籤驗證
CONTORLER 
[ValidateInput(false)]