HtmlEditor :  Phorum 5 The fastest message board... ever.

This is the discussion forum for the HtmlEditor. See also the HtmlEditor home page, where you can download the control, and the Documentation Wiki, a collaborative project for documenting the control.

Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
Changing all the source of a document without LoadDocument
Posted by: Swolak (---.pool8253.interbusiness.it)
Date: Sunday, 08-Oct-2006, 15:06:49

I noticed that LoadUrl makes the control correctly show images/styles for relative paths. But when i edit the source code calling LoadDocument to show changes in the designer, all relative paths are lost. So i was wondering if there's a way to set the new source code after calling the LoadUrl without unloading the url (and so without loosing relative paths). Thanks

Re: Changing all the source of a document without LoadDocument
Posted by: Tim (---.gotadsl.co.uk)
Date: Monday, 09-Oct-2006, 09:54:34

You can use the base tag.

Tim

Re: Changing all the source of a document without LoadDocument
Posted by: JOhn (---.wol.net.pk)
Date: Monday, 16-Oct-2006, 19:26:54

how to use the base tag?

Re: Changing all the source of a document without LoadDocument
Posted by: liorklain (---.cust.bezeqint.net)
Date: Tuesday, 17-Oct-2006, 09:04:11

HTMLBaseElement baseElement = (HTMLBaseElement)htmlEditor1.Document.createElement("BASE");

baseElement.href = urlOfImagesorOtherResources;

// get head node
headNode.appendChild((IHTMLDOMNode)baseElement);

Re: Changing all the source of a document without LoadDocument
Posted by: John (203.82.63.---)
Date: Tuesday, 17-Oct-2006, 09:49:37

Do i have to use base tab with each resource or image?

Re: Changing all the source of a document without LoadDocument
Posted by: Tim (---.gotadsl.co.uk)
Date: Tuesday, 17-Oct-2006, 10:41:02

A relative reference is no use if the document was not loaded from any specific location - "relative" makes no sense in this context. Setting the base tag specifies the base from which relative references are calculated. It is set once for the whole document. Of course you could also specify an absolute reference for any image or resource, in which case the base tag is not needed.

See also: <[www.w3.org];

Tim

Re: Changing all the source of a document without LoadDocument
Posted by: Inam (203.135.5.---)
Date: Tuesday, 24-Oct-2006, 15:04:17

i am very new to htmleditor.........can u please tell me how to get the head node?



Your Name: 
Your Email: 
Subject: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically.
bPpwM
This is a moderated forum. Your message will remain hidden until it has been approved by a moderator or administrator
This forum powered by Phorum.