Blog

How to reset FreeTextBox editor using javascript

Posted by Purushottam Rathore Blogs | JQuery Mar 15, 2013
How to reset FreeTextBox editor using javascript.

This is third party open source FreeTextbox (FTB) editor. With the help of this blog you can reset the freetextbox editor using javascript. This is very simple but tricky code.

<FTB:FreeTextBox ID="FreeTextBox1" BreakMode="LineBreak" DesignModeCss="~/FreeTextBox/DesignMode.css" Width="780px" Height="210px" ToolbarLayout="FontFacesMenu,FontSizesMenu,FontForeColorsMenu,FontForeColorPicker,FontBackColorsMenu,FontBackColorPicker,SymbolsMenu|Cut,Copy,Paste,Delete|Bold,Italic,Underline,Strikethrough,Superscript,Subscript,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,Unlink,InsertImageFromGallery|InsertRule,InsertDate,InsertTime,InsertTable,InsertDiv,EditStyle,Preview,SelectAll,WordClean,NetSpell" runat="Server" Focus="False" TabIndex="0" SupportFolder="~/FreeTextBox/" AutoParseStyles="False" FormatHtmlTagsToXhtml="False" HtmlModeDefaultsToMonoSpaceFont="True" ClientIDMode="Static"></FTB:FreeTextBox>

<input type="button" value="Reset" id="buttonReset" runat="server" clientidmode="Static" />

<script language="javascript">

$("#buttonReset").bind('click', function () {
            
if (FTB_API != null) {
                objFTBControl = FTB_API[
'FreeTextBox1'];
                
if (objFTBControl) {
                    objFTBControl.SetHtml(
"");
                }
            }     
});

</script>

post comment
     
COMMENT USING
PREMIUM SPONSORS
Over-C is a holistic consortium of communications and technology specialists. We build, deploy and market both business as well as consumer products and solutions.
Get Career Advice from Experts
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Join a Chapter