CuteEditor配置 .net控件

CuteEditor是一款功能非常强大,支持图片上传、文件下载和word类似的文字编辑器。并且Vs2003和Vs2005都可以适用。
1、将以下文件考贝到你站点根目录下的bin内(这些在CuteEditor6.0/bin下都可以找到)CuteEditor.dllCuteEditor.ImageEditor.dll(6.0增加的EditorImage功能)CuteEditor.lic(解密文件)NetSpell.SpellChecker.dll(拼写检查功能)注:(“.dic”为扩展名的文件是词典保存为纯文本文件的格式。将CuteEditor6.0/bin文件夹里的都拷到站点根目录下的bin内也可以)
2、将CuteSoft_Client文件夹拷贝到项目的相应目录.(CuteSoft_Client包含CuteEditor文件夹和 example.css,放了控件图片,文件之类的数据example.css它指定了编辑器的样式)注:FilesPath用来设置所对应的目录, 如:FilesPath="~/admin/CuteSoft_Client/CuteEditor/"
3、在根目录下建立Uploads的文件夹作为上传图片及附件的根目录。
4、将CuteEditor.dll添加到工具箱
5、CuteEditor属性设置(假设当前页在根目录下): 1)AutoConfigure设为simple,即选择最简单的界面显示方式 2)EditorWysiwygModecss设为:CuteSoft_Client/example.cs 3)FilesPath 设为:CuteSoft_Client/CuteEditor
6、控件的调用代码如下:  <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>  <CE:EDITOR id="Editor1" runat="server" Width="700px" FilesPath="~/CuteSoft_Client/CuteEditor/" EditorWysiwygModeCss="../example.css" ThemeType="Office2003_BlueTheme"></CE:EDITOR>
7、修改Web.config文件 <appSettings> <add key="DictionaryFolder" value="bin" /> < /appSettings> <system.web> <browserCaps> tagwriter=System.Web.UI.HtmlTextWriter & lt;/browserCaps> </system.web>注意:1)可以修改 CuteSoft_Client/CuteEditor/Configuration/AutoConfigure文件夹下的文件,改便 CuteEditor工具栏按钮的显示或排列。2)可以修改文件CuteSoft_Client/CuteEditor/Configuration /Shared/Common.config来添加字体。3)可以修改CuteSoft_Client/CuteEditor /Configuration/Security文件夹中的Admin.config,Default.config,Guest.config来控制权限上传图片和文件的问题。(在属性里设置:SecurityPolicyFile为这.config三个中的一种)特别提醒一下:有的系统可能要设置一下保存图片和文件的文件夹的访问权限,把Uploads文件夹的安全中everyone用户改为写入即可。不然文件会上传不上去,因为没有写入权限。
8、出错总结:出错1:无法为类型 CuteEditor.Editor 授予有效的许可证。有关详细信息,请与组件的制造商联系。原因:可能缺少CuteEditor.lic文件,把CuteEditor.lic文件考贝到Bin目录下即可。出错2:点击工具栏里的插入样板按钮弹出这样的错误页面:使用主题 css 文件要求页上有标头控件。(例如 <head runat="server" />)。原因:Asp.net2.0引入Theme后,要求<Head>标签runat="server"而CuteEditor是1.1版本引起的。解决办法:给CuteSoft_Client/CuteEditor夹下的template.aspx里的<Head>添加 runat="server"能解决加载时闪过的错误。给CuteSoft_Client/CuteEditor/Help下的default.aspx 里的<Head>添加能解决点击工具栏里的插入样板按钮也弹出的错误页面。若点击其他工具栏也弹出同样的错误,可以右键错误页面,查看该页面的路径,修改在CuteSoft_Client文件夹下对应的页面中的<Head>标签。


基本属性:

EditorWysiwygModeCss :设置样式
ThemeType :设置风格
AutoConfigure :选择功能是简单还是复杂的
Text :设置加载时候默认内容
MaxHTMLLength :设置最大长度
BreakElement :默认“回车”产生什么HTML
URLType :没发现有什么区别
ResizeMode :自动长度(长度设置的几中形式)
ReadOnly :是否为只读
CustomCulture :设置语言类型 china 为zh-cn
EditCompleteDocument :设置是否完整的HTML页面代码(也就是说是不是包括html头)
AllowPasteHtml :是否允许粘帖HTML代码
EnableContextMenu :在文本里是否显示右键菜单

调用模板 :

void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack)
{
//this.Editor1.Text = "";
//Editor1.LoadHtml("templates/template3.htm");
}
}

控制工具拦显示

在CuteSoft_Client/CuteEditor/Configuration/AutoConfigure 里设置

控制右键显示

CuteSoft_Client/CuteEditor/Configuration/ContextMenuMode里设置

设置权限

CuteSoft_Client/CuteEditor/Configuration/Security里设置

设置工具拦按钮具体功能

CuteSoft_Client/CuteEditor/Configuration/Shared 里设置

设置工具拦按钮具体功能

CuteSoft_Client/CuteEditor/Configuration/Shared 里设置


设置语言

CuteSoft_Client/CuteEditor/Configuration/Languages里设置

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值