HtmlTextBox使用心得

我在上一篇文章中介绍了如何引用dll文件的,这里就不在罗嗦了,现在讲下它的配置吧,就是说如何定制出满足自己需求的控件,它有两种配置模式

1)利用配置字符串 ,如 ConfigString=”Cut,Copy” , 则只显示剪切,复制按钮
所有可采用的配置有:Cut,Copy,Paste,Delete,Undo,Redo,Print,Bold,Italic,Underline,Strikethrough,Superscript,Subscript,InsertImage,CreateLink,Unlink,FontForeColorPicker,FontBackColorPicker,RemoveFormat,FormatBlock,FontName,FontSize|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull,insertunorderedlist,insertorderedlist,Indent,Outdent,inserthorizontalrule,InsertDate,InsertTime,WordCount,WordClean,UploadPanel,SourceViewer    

     其中“|”表示换到下一个工具栏显示

2)利用子控件,即将HtmlTextBox已实现的子控件加入到HtmlTextBox标签内部,或外部:
       子控件示例:
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->

       <htb:htmltextbox id="HtmlTextBox2" runat="server" StyleConfig="CoolBlue" ConfigString="Blod,RichTextBox"       ConfigMode="None" Height="160px" Width="288px">

       <htb:ToolBar Runat="server" id=" ToolBar 1">

                     <htb:sourceviewer id="Sourceviewer1" runat="server"></htb:sourceviewer>

       </htb:ToolBar>

       <htb:RichTextBox id="Sourceviewer4" runat="server"></htb:RichTextBox>

       </htb:htmltextbox>

                     

       <htb:UploadPanel id="Uploadpanel2" runat="server" ConfigMode="Lovely" TopContainerID="HtmlTextBox2"        Width="920px"></htb:UploadPanel>
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->

       如上:sourceviewer , RichTextBox加入HtmlTextBox内部, UploadPanel置于HtmlTextBox标签外部,通过TopContainerID与HtmlTextBox关联

 

这里要注意的一点是:利用第一种方法时:要将configmode设置为configstring,否则还是启用的默认的方式

如何启用图片和附件上传功能:


调用方法1:ConfigMode="EnableAll"时上传控件会出现,设置一下上传文件夹路径即可。
路径相对站点根目录。


调用方法2:利用外置控件   
<htb:htmltextbox id="Htmltextbox4" runat="server" ConfigMode="Default" Width="920px"></htb:htmltextbox>
<htb:UploadPanel id="UploadPanel1" runat="server" ConfigMode="Lovely" TopContainerID="Htmltextbox4"

将UploadPanel1 的 TopContainerID与Htmltextbox4关联,则上传的图片自动插入Htmltextbox4中


具体功能及属性查看控件文档

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值