views:

1184

answers:

11

I have been searching for something that does this for a while now, but with no luck yet... We have an internal application that stores/uses text in HTML format. Now I am looking for a new control for editing it.

I do not need a full-featured HTML editor, just something that can deal with simple formatting. It also needs spell checking functionality. In the beginning, we used Word embedded with Microsoft's DSO framer control. That caused COM headaches and performance problems on the workstations. More recently we have been using IE in edit mode. That fixed the performance problems, but not the COM problems.

I would like to find something with no external dependencies, or at least that is all managed code. I wouldn't mind building a control of my own around the richtextbox, but I am concerned about the HTML->RTF->HTML conversions. Since we have to deal with incoming e-mails, we can't be too confident using only a subset of HTML. We would also consider buying a component if it fit our needs. I would prefer something light-weight. We don't need to embed Word all over again!

Has anyone else run into the same problem? How did you solve it?

A: 

You might try Infragistics. They have an html editor control with spell check.

Jon B
A: 

Thank you for the reply! It's something to keep in mind, but I'm not sure I can successfully convince the bean-counters to give me $1000 for a package. Also, I should clarify: I am actually looking for .NET 2.0 winforms controls, not ASP.NET

When it comes to 3rd party tools, give them a quote in man-hours to develop and the cost in dollars to purchase. They'll get the point in a hurry! Good luck with your project.
Jon B
+1  A: 

Here are a couple of options for for an open source .NET-based text editor that handles syntax highlighting

It should be relatively easy to set these up for HTML, or find existing syntax definitions for HTML.

I'm not too sure about embedding spellcheck into it, but this article may be of interest:

SpellCheck.net spell checking parsing using C#

AR
A: 

Take a look at XStandard. It is a fully featured XHTML editor, but you can customise it to your requirements. I've used it in both Windows and Web applications with good results, you can get a Lite (free) version or Pro (reasonable cost and allows full customisation of the editor). Their technical support is good too. The only 'problem' we've had with it is that it produces valid/compliant XHTML, so if you're importing non-XHTML content in you'll have to run it through HTMLTidy or similar first.

Oh yeah - it includes a spell checker too.

Nick
A: 

I solved it using this HTML textbox? It encapsulates IE and uses it for HTML editing, just like you did. No Spell checker.

GvS
A: 

I'm in same boat as you are.

Using a managed wrapper around the MSHTML com control (dont remember which one, there are a few, for instance there is this one). From what I understand our company has examined a few of this kind of controls and at the moment we have decided to stick with MSHTML.

We also needed a spell checker, we are using RapidSpell. But there are plenty open source / free spell checkers.

We are pulling the plain text out of MSHTML and allowing the spell checker to process it. hen collect the list of he invalid words and their fixes and inject it back into the html stream.

It's not that much work, about a week to glue it all together.

About using the RTF control, we have examined this possibility as well, and decided not to go with it because we had lots of pain in the past with HTML > RTF > HTML.

One advantage the MSHTML control has over the other 3rd party controls is that it supports copy and paste into the control from most of the applications, you can copy from word or some other formatted text, and the pasted text will keep the formatting, some thing that is not supported by most of the other controls.

Alex Shnayder
A: 

Since I was too much of a cheapskate to buy a spell checking control for our internal app (that would have been total overkill), I cobbled together an IExtenderProvider that does wavy red line spellchecking on textboxes. I've been sitting on the code for a while but I just blogged about it; there's a sample application there.

Some caveats:

  • It will think that HTML is misspelled, but you might be able to modify it to make it work for you.
  • Heck, it even thinks numerals are spelled wrong. An easy fix, but I've been too lazy to fix it.
  • If the dictionary should go missing, it has a total freak out.

But, hopefully it'll give you some ideas, even if you're not able to use it directly.

Another thing you might consider is that I know some of the WPF text controls have spell checking built in. But I'm not sure how they handle HTML.

Nicholas Piasecki
A: 

I just ran across Text Control. I can't speak from personal use, but it looks to be a very feature rich editor in pure .net. Seems to have wide format support, as well as the spell checking you need.

fawce
A: 

To solve this task I recommend the HTML-to-RTF Pro DLL .Net and RTF-to-HTML DLL .Net, it's standalone C# components without any other dependencies.

The total price will be 450 USD and you will get: HTML->RTF->HTML solution.

Here you may download the components: http://www.sautinsoft.com

Maximus
A: 

I am actually looking for .NET 2.0 winforms controls

I looked for one a couple of years ago and didn't find one.

So, I've developed one: see http://www.modeltext.com/html/

It's a WYSIWYG XHTML editor, written in C#, with a .Net-native (i.e. not COM) API. It supports some (not all) CSS properties, derives from System.Windows.Forms.Control, and depends on version 2 of the .Net framework (and on nothing else).

It doesn't include a spell-checker, but its API lets you walk and interact with the DOM, so you could develop spell-checker functionality yourself, if you wanted it.

ChrisW
A: 

CKEditor (formerly fckEditor). It's everything including the kitchen sink, but you can configure the toolbar, so if you only want basic HTML features you can do that. It has examples for all kind of web programming langugages including ASP.NET, see http://ckeditor.com/demo . Also, it's open source.

nickyt
It wasn't clear in your question. Is this for a web site or desktop app? If it's web, I recommend this. Also most browsers provide spell checking now, but there is also an IE spell ACtiveX component. If it's a desktop app, I guess you could run CKEditor in a browser control. My two cents.
nickyt