Create a html editor using TWebBrowser and save as MIME format2007-05-03 12:23:57 PM delphi240 Hi! As what i have researched recently, i found that TWebBrowser has the following functions: - 1) TWebBrowser can be used for editing webpage if the edit mode is turn on 2) TWebBrowser able to load a .mht file (mime formatted) using TWebBrowser.Navigate() method 3) TWebBrowser can save a html file in mime format with the following code: var Msg: IMessage; Conf: IConfiguration; Stream: _Stream; begin Msg := CoMessage.Create; Conf := CoConfiguration.Create; try Msg.Configuration := Conf; Msg.CreateMHTMLBody(WebBrowser1.LocationURL, cdoSuppressAll, '', ''); Stream := Msg.GetStream; Stream.SaveToFile('C:\test.mht', adSaveCreateOverWrite); end; Note: IMessage.CreateMHTMLBody only can convert html to MIME and not MIME to MIME 4) The image save in mime format might be the cid string e.g: <img border="0" src="cid:000a01c78d39$dcea4e46$_CDOSYS2.0" width="44" height="27"></td> But i wish to create a html editor using TWebBrowser and save as MIME format, which to achieve the following: 1) Load mime content / .mht file into TWebBrowser 2) Let user edit the html content (edit text, add image, delete image and etc) in TWebBrowser 3) Save the changes back as mime format (.mht file) How do i achieve the function i mentioned above? Thanks in advance. Regards Sherlyn Chew |
|