views:

451

answers:

4

We are using the FreeTextBox 3.1.6 on an intranet. The control appears on an ASP.Net project built in Visual Studio 2008.

When clients enter tabs in the text box, those tabs do not get preserved at postback. Rather, the tabs are lost. Other text formatting, like bold, italics, or font size are preserved.

Even when the postback event that occurs on the web page does not save anything to a database we are loosing the tabs. According to http://wiki.freetextbox.com/default.aspx/FreeTextBoxWiki.Installation the JavaScript and XML used by FreeTextBox are stored in a dll. So I cannot edit the contents of those files.

Has anyone encountered this issue with FreeTextBox? If so, how did you resolve it?

Here is the behavior that occurs. Enter text with tabs in the FreeTextBox control.

Then select the "Save" button. This is a command button that posts back the page. In my test scenario nothing gets saved and loaded from a database. The FreeTextBox control is strictly displaying text that was posted. My guess is that the mechanism handling that is in ViewState, but I'm not sure about that.

As you can see, all of the tabs are gone. Even the tabs inserted between words are gone. Thanks for your help.

Ken

A: 

Setting TabMode to "InsertSpaces" did not resolve this. My source code for instantiating the control is below. Pictures I posted didn't previously show up. Visit these links to see them. http://img132.imageshack.us/img132/4826/ftb1postcz4.gif http://img132.imageshack.us/img132/175/ftb2postbd6.gif

A: 
<FTB:FREETEXTBOX id="txtDocument" EnableHtmlMode="False" Width="100%" runat="server" AllowHtmlMode="True"
StripAllScripting="True" Height="400px" FormatHtmlTagsToXhtml="False"
AutoGenerateToolbarsFromString="true"
ToolbarLayout="ParagraphMenu, FontFacesMenu, FontSizesMenu, FontForeColorsMenu, FontForeColorPicker| Bold, Italic, Underline, Strikethrough; Superscript, Subscript, RemoveFormat| JustifyLeft, JustifyRight, JustifyCenter, JustifyFull; BulletedList, NumberedList, Indent, Outdent; CreateLink, Unlink, InsertImage, InsertRule| Cut, Copy, Paste; Undo, Redo, Print"
TabMode="InsertSpaces"
>

A: 

I found the answer. The original programmer had code that intercepted the contents of the textbox when it was submitted. That code reformatted the text for special currency characters like the Yen, Euro, and Pound.

Here is what the code looked like.

Dim hstrg As String = txtDocument.Text Dim f As New FreeTextBoxControls.Support.Formatter hstrg = f.HtmlToXhtml(hstrg)

What fixed the issue was commenting out that HtmlToXhtml() method. We don't need the contents to be Xhtml compatible, so this was a viable option for us.

A: 

i've been using free text box in some of my former development, but it had some quirks and wouldn't work right in IE.

try moving to FCKEditor, or TinyMCE. they seem like much better experience than FTB. i've chosen FCK, and i think WordPress uses TinyMCE. try them if a switch of editor is an option.

zappan