从baidu或google上下载最新版本的FreeTextBox3.1.6
打开你的项目,添加引用Framework-2.0/FreeTextBox.dll
打开工具栏,反键,选择项,再次添加,这样你的工具栏就会多出FreeTextbox控件,还会有其他一些控件,不过我都没动,也不知道具体怎么用,毕竟我也是菜鸟!
然后将ftb.imagegallery.aspx拷贝到需要使用到的.aspx文件的同级目录下,当然母板也可以用!
这样就可以使用freetextbox了
有几个地方需要注意
1.修改ImagaeGallerPath属性为你图片放置的路径
2.Language调整语言. 简体中文是zh-cn
3.ToolbarLayout属性,添加一个InsertImageFromGallery就可以从图片库中插入图片了
其实这里面还可以添加很多按钮功能,至于分别有什么用就不清楚,都粘出来给大家吧!
ToolbarLayout="ParagraphMenu, FontFacesMenu, FontSizesMenu, FontForeColorsMenu,
FontForeColorPicker, FontBackColorsMenu, FontBackColorPicker, Bold, Italic, Underline|
Strikethrough, Superscript, Subscript, InsertImageFromGallery, CreateLink, Unlink,
RemoveFormat, JustifyLeft, JustifyRight, JustifyCenter, JustifyFull, BulletedList|
NumberedList, Indent, Outdent, Cut, Copy, Paste, Delete, Undo, Redo, Print, Save,
ieSpellCheck, StyleMenu, SymbolsMenu, InsertHtmlMenu, InsertRule, InsertDate|
InsertTime, WordClean, InsertImage, InsertTable, EditTable, InsertTableRowBefore,
InsertTableRowAfter, DeleteTableRow, InsertTableColumnBefore, InsertTableColumnAfter,
DeleteTableColumn, InsertForm, InsertForm, InsertTextBox, InsertTextArea|
InsertRadioButton, InsertCheckBox, InsertDropDownList, InsertButton, InsertDiv,
InsertImageFromGallery, Preview, SelectAll, EditStyle,InsertImageFromGallery"
4.打开新建目录,上传文件等功能
修改ftb.imagegallery.ASPx页面可以做到
<FTB:ImageGallery id="ImageGallery1"
SupportFolder="~/ASPnet_client/FreeTextBox/"
AllowImageDelete="true" AllowImageUpload="true"
AllowDirectoryCreate="true" AllowDirectoryDelete="true" runat="Server" />
修改AllowImageDelete等属性
...这个我没用到!所以错了也不要找我!呵呵!~
还有一点大家要注意,有些时候大家是要对用户输入做危险字符过滤
这对FreeTextBox没必要,他会将用户输入的任何东西存储起来,就算你输入的是危险字符或标签它也只当做是文本!
好了,这就是FreeTextBox控件使用...写的很烂,大家不要骂我就ok了!
我会经常上传一些我自己的开发经验,希望大家能多多光顾我的blog!
thank you !