1. Create a project and drag PowerWEB TextBox and RapidSpellWebLauncher into it. 2. Set RapidSpellWebLauncher.ShowButton = false, this will hide the default button. 3. Set RapidSpellWebLauncher.TextComponentInterface = PowerWEBTextBox 4. Set RapidSpellWebLauncher.IgnoreXML = true 5. Set RapidSpellWebLauncher.TextComponentName to the ID of the Text Box, eg. "HtmlBox1" 6. Create a web form for the popup, call it "PopUp.aspx" and add the RapidSpellWeb control to it, like usual. Set RapidSpellWebLauncher.RapidSpellWebPage = "PopUp.aspx" 7. In the code-behind for the first form, add the following method; //C# void AddSpellCheckToTextBox(Dart.PowerWEB.TextBox.HtmlBox tb, Keyoti.RapidSpell.RapidSpellWebLauncher launcher){ tb.AddToolbarItem(Dart.PowerWEB.TextBox.ToolbarItemType.DoubleSeparator); Dart.PowerWEB.TextBox.ToolbarButton b = new Dart.PowerWEB.TextBox.ToolbarButton(Dart.PowerWEB.TextBox.ToolbarButtonType.Custom);b.ImageName = "spellcheck.gif"; b.ToolTip = "Check spelling"; b.OnClickFunctionName = "popUpCheckSpelling"+launcher.ClientID+"('rsTCInt"+launcher.ClientID+"')"; tb.Toolbar.Items.Add(b); } 'VB.NET Private Sub AddSpellCheckToTextBox(ByVal tb As Dart.PowerWEB.TextBox.HtmlBox, ByVal launcher As Keyoti.RapidSpell.RapidSpellWebLauncher)tb.AddToolbarItem(Dart.PowerWEB.TextBox.ToolbarItemType.DoubleSeparator) Dim b As New Dart.PowerWEB.TextBox.ToolbarButton(Dart.PowerWEB.TextBox.ToolbarButtonType.Custom)b.ImageName = "spellcheck.gif" b.ToolTip = "Check spelling" b.OnClickFunctionName = "popUpCheckSpelling" + launcher.ClientID + "('rsTCInt" + launcher.ClientID + "')" tb.Toolbar.Items.Add(b) End Sub 8. Call that method from the Page_Load: //C# private void Page_Load(object sender, System.EventArgs e){ // Put user code to initialize the page hereif(!IsPostBack)AddSpellCheckToTextBox(HtmlBox1, RapidSpellWebLauncher1); } 'VB.NET Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load'Put user code to initialize the page hereIf Not IsPostBack Then AddSpellCheckToTextBox(HtmlBox1, RapidSpellWebLauncher1) End If End Sub (assuming that your PowerWEB TextBox instance is called HtmlBox1 and your RapidSpellWebLauncher instance is RapidSpellWebLauncher1.) 9. In the popup.aspx page you will need to add validateRequest="false" to the "<% Page" directive, this tells ASP.NET to not warn about HTML content in the request (the HTML is actually the formatted text from the textbox). Note: If you are using .NET 4 or higher you will need to add <httpRuntime requestValidationMode="2.0" /> in web.config under <system.web> That's it, you will now see a spell check icon in the toolbar. |