After an unsuccessful attempt at integrating the new
FreeTextBox 3.0 release into our .TEXT engine at CodeBetter.Com, last night I finally got it working. I started with a post from Paul (see
Adding FreeTextBox 3.0 to .Text Version 0.95), but wasn't fully successful, and I found that the process involved a couple of extra steps. Here's how to update a production .TEXT deployment with the new FreeTextBox, should you need to do the same thing:
Step 1: Add FTB 3.0 dll to your local .TEXT project
Download and drop the new freetextbox.dll into the "OtherStuff\ThirdParty" directory. This is where the Admin and Dottext.Web projects reference the
freetextbox.dll.
Step 2: Modify EntryEditor.ascx.cs Source The EntryEditor page does some browser checking to only update the FTB content for IE. You'll need to modify the following lines of code.
351 entry.Body = Globals.StripRTB(Utilities.CheckIsIE55() ? ftbBody.Text : txbBody.Text,Request.Url.Host);
to
351 entry.Body = Globals.StripRTB(ftbBody.Text,Request.Url.Host);
421 valftbBodyRequired.Visible = ftbBody.Visible = Utilities.CheckIsIE55();
to
421 valftbBodyRequired.Visible = ftbBody.Visible = true;
434 private void SetEditorText(string bodyValue)
435 {
436 if (Utilities.CheckIsIE55())
437 ftbBody.Text = bodyValue;
438 else
439 txbBody.Text = bodyValue;
440 }
to
434 private void SetEditorText(string bodyValue)
435 {
436 ftbBody.Text = bodyValue;
437 }
Step 3: Modify EntryEditor.ascx
Update your FTB control tag, since the new version breaks the old version's type..
95 <FTB:FreeTextBox id="ftbBody" runat="server" width="98%" visible="False"
96 ToolbarImagesLocation="ExternalFile"
97 ButtonImagesLocation="ExternalFile"
98 JavaScriptLocation="ExternalFile"
99 SupportFolder="~/aspnet_client/FreeTextBox/"
100 toolbarlayout="Bold,Italic,Underline,Strikethrough;
Superscript,Subscript,RemoveFormat|FontFacesMenu,
FontSizesMenu,FontForeColorsMenu|JustifyLeft,
JustifyRight,JustifyCenter,JustifyFull;BulletedList,
NumberedList,Indent,Outdent;CreateLink,Unlink,Insert,
InsertRule|Cut,Copy,Paste;Undo,Redo|ieSpellCheck,
WordClean,InsertDate,InsertTime,InsertImage"
101 toolbarbackcolor="Transparent" backcolor="Transparent" height="300px"
102 gutterbackcolor="Transparent" GutterBorderColorDark="Transparent"
103 EditorBorderColorDark="Transparent" EditorBorderColorLight="Transparent" />
Step 4: Rebulid
You'll need to build your .TEXT Admin
and Dottext Web Projects, not rebuilding the DLLs will give you some nasty runtime errors.
Step 5: DeployCopy the aspnet_client directory included with FTB to the root of your .TEXT installation.
Copy your new EntryEditor.ascx page into your Admin/UserControls directory
Re-Deploy the Dottext.* dlls and the freetextbox.dll to your production environment.
That should be it! Good luck!
-Brendan (posting entirely from Firefox)
Posted
Wed, Feb 9 2005 7:02 AM
by
Brendan Tompkins