Using HTC's in design mode

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Colin Green (bughunter_at_hotmail.com)
Date: 06/18/04


Date: 18 Jun 2004 09:07:59 -0700

I noticed that when I load a HTML document that contains HTML
Components (HTCs) into IE6, that the HTC elements disappear if I
programatically switch the HTML document into design mode. Very simply
I do this by setting IHTMLDocument2.designMode=true

An alternative way of doing this is to ensure there is
contentEditable="true" attribute on the <body> element in the document
before I load it. This does solve this particular problem, but this
causes problems for me elsewhere, e.g. I am currently using
IPersistStreamInit.IsDirty() to determine if the document has been
edited - if I use contentEditable="true" then this flag no longer
reflects the state of the document.

Perhaps if I could place the HTC definitions within the document I am
trying to render this would solve the problem? Unfortunately I can't
see any way of doing this.

Any ideas?

Thanks in advance,

Colin Green



Relevant Pages

  • Re: Possible to Insert One HTML Doc Into Another?
    ... Pavlik Morosov wrote: ... > Is it possible to load an HTML document into the main HTML document, ... > like inserting a graphic? ...
    (alt.html)
  • Re: Possible to Insert One HTML Doc Into Another?
    ... > Is it possible to load an HTML document into the main HTML document, ... Very Generous Cpanel Hosting & Fully Managed Servers ... Newsgroup 20% Discount Code: newsgroup ...
    (alt.html)
  • XP SP2 and HTCs in webbrowser control
    ... The page that attempts to load the HTC is generated by loading "about:blank" ... If I write the HTML page to disk and then use Navigate2to load it from ... it loads and executes the Javascript in the HTC. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Using document.load() to get html NOT xml document
    ... I wish to load an html document which may or may not be xhtml. ... wish to retrieve some elements using getElementsByTagName(). ...
    (comp.lang.javascript)
  • Re: HTML Parsing in VB.Net
    ... I have the HTML document stored in memory and I would need to load it in ... HTTPWebRequest and HTTPWebResponse classes. ... Does anyone have any good examples using the HTMLAgilityPack? ...
    (microsoft.public.dotnet.languages.vb)