Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 402
  • Last Modified:

Html editor for Delphi

I need a html editor for delphi. My program has to handle emails like outlook(I can directly edit in the email). User will do modificatio that will be automatically convert to html code.

1 Solution

I maybe have what you are looking for constructing text on  HTML pages. You are looking for something for very little points.

What I have is a Delphi text editor using colored text, that allows the user to enter text into a Memo1. After completion, a click adds a "<br>" to the end of each of the lines in Memo1 and a "<html>" before Memo1 text  and "</html>" at the end before being put into Memo2. IE processes the message that is in Memo2 and opens a IE html page, the user then can save what is on the IE html page.
 A Delphi spell checker is included. No provision is made for images to be added to the text. To my knowledge with this arrangement of Memo's no image additions can be expected or is possible.

Still interested? Or are there enough hints here to get you started on your own?


Hi chookoo

mabey you can use the HTML Display Components from http://www.pbear.com/htmlviewers.html for this task

PS. The ThtmlLite HTML Viewer Components are free


This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
You already have one in Delphi, it is the TWebBrowser component.

Insert the TWebBrowser into your project and to turn it into an editor add the folowing:-

USES ... MSHTML, ...
(WebBrowser1.Document as IHTMLDocument2).designMode := 'on';   // Start editing

To get the HTML just use the following:-

Text := (WebBrowser1.Document as IHTMLDocument2).body.innerHTML;  // Get the HTML

You need a document inside the control, creating it does not make a blank HTML document so "Document" will be NIL.  To create a blank document, use the following:-

WebBrowser1.Navigate('about:blank'); // Blank doc

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now