分享

Create a html editor using TWebBrowser and save as MIME format

 quasiceo 2012-12-24

Create a html editor using TWebBrowser and save as MIME format


2007-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

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多