1、拷貝檔案
(1)將CuteEditor、Bin檔案夾下的:
CuteEditor.dll
CuteEditor.lic(解密檔案)
CuteEditor.ImageEditor.dll (5.0增加的EditorImage功能)
NetSpell.SpellChecker.dll(拼字檢查功能)
拷貝到項目的Bin目錄下。
註:(“.dic”為副檔名的檔案是詞典儲存為純文字檔案的格式。將bin檔案夾裡的都拷到項目的bin目錄下也可以)
(2)將CuteSoft_Client檔案夾及檔案拷貝到項目的相應目錄。
注:FilesPath用來設定所對就的目錄,如:
FilesPath="~/admin/CuteSoft_Client/CuteEditor/"
(3)把example.css檔案拷貝到相應目錄,並設定EditorWysiwygModeCss屬性。如:EditorWysiwygModeCss="/admin/CuteSoft_Client/CuteEditor/themes/example.css
綜合設定如下:
<CE:Editor ID="Editor1" runat="server" FilesPath="~/admin/CuteSoft_Client/CuteEditor/"
EditorWysiwygModeCss="/admin/CuteSoft_Client/CuteEditor/themes/example.css"></CE:Editor>
2、修改Web.config檔案
<appSettings>
<add key="DictionaryFolder" value="bin" />
</appSettings>
<system.web>//注本節代碼在.net2.0下是否需要設定,本人未驗證。
<browserCaps>
tagwriter=System.Web.UI.HtmlTextWriter
</browserCaps>
</system.web>
3、引用:
·<%@ Register Assembly="CuteEditor" Namespace="CuteEditor" TagPrefix="CE" %>
·<CE:Editor ID="ce1" runat="server" FilesPath="~/admin/CuteSoft_Client/CuteEditor/"
EditorWysiwygModeCss="~/Admin/CuteSoft_Client/CuteEditor/Themes/example.css" ThemeType="Office2003_BlueTheme" >
</CE:Editor>
註:
可修改CuteSoft_Client\CuteEditor\Configuration\AutoConfigure檔案夾下的檔案,改便CuteEditor工具列按鈕的顯示或排列。
可修改檔案CuteSoft_Client\CuteEditor\Configuration\Shared\Common.config來添加字型。
發現無效字元的問題,只需在web.config中將編碼改為"utf-8"就可以