BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: MSHTML and Activating the MSHTML Editor

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Usage
View previous topic :: View next topic  
Author Message
Pascal Chapuis
Guest





PostPosted: Fri Jul 11, 2003 7:08 am    Post subject: Re: MSHTML and Activating the MSHTML Editor Reply with quote



"Brad" <bradin_NOSPAM_theusa (AT) hotmail (DOT) com> a écrit dans le message de news:
3f0e2812$1 (AT) newsgroups (DOT) borland.com...
Quote:
Maybe it's late at night but I can't seem to work this out.


in the morning, with the sunshine...

Quote:
I have this unit MSHTML.pas. It came with Delphi 7.0

I want to do WYSIWYG HTML editing just like this.

http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/editing/

mshtmleditor.asp
Quote:

But I'm expecting to find this component already installed and some
samples
on the web.

But I can't find this component on my palette and I can't find an samples
using Google.


The HTML Com componentssssss (MSHTML_TLB/MSHTML) are NOT wrapped in VCL in
Delphi 6 (and 7).
You can access them through the TWebbrowser document.

Quote:
Can someone please point me in the right direction to enabled WYSIWYG HTML
editing.


The same fonctionnality is implemented with TDHTMLEdit as an HTML container
/ editor.
This COM component encapsulates the security, gui / editing access to
IHTMLDocument2 document.

JavaScript :
(http://msdn.microsoft.com/workshop/samples/browser/webediting/onepageeditor
..htm)

else if (text == "FontName")
{
theName = document.all.fontname.value;
if (theName != "")
document.execCommand("FontName", false, theName);
}


Delphi :
(http://www.euromind.com/iedelphi/EditHTML.htm)

procedure THTMLEdit.SetProperty(const Name: String; Value: OleVariant);
var
V: OleVariant;
S: OleVariant;
begin
V := DOMInterface.selection.createRange;
S := Value;
V.execCommand(Name , False, S);
// UpdateDisplay;
end;

--------
pascal



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi ActiveX Controls Usage All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.