Hi
nsIHTMLEditor features a method called updateBaseURL() to rebase a
document contained in a HTML editor.
The description says: "Set the BaseURL for the document to the current
URL but only if the page doesn't have a tag This should be done after
the document URL has changed, such as after saving a file This is used
as base for relativizing link and image urls".
I am exactly in that situation, but there is obviously no way to change
the URI of an existing document without reloading it from source.
UpdateBaseURL()
(http://lxr.mozilla.org/mozilla1.8.0/source/editor/libeditor/html/nsHTMLEditor.cpp#1209)
calls GetDocumentURI
(http://lxr.mozilla.org/mozilla1.8.0/source/content/base/src/nsDocument.cpp#3788)
to retrieve the document's URI. But setting it beforehand is not possible.
What am I doing wrong? I must be missing something, because
updateBaseURL() does not exist without merit, and especially not when
mentioning the usecase of rerooting a document after e.g. a save explicitly.
I've already looked at the Composer, but couldn't find any hints.
I hope somebody can give me a pointer on what I'm missing here.
--
Kind regards,
Andi
_______________________________________________
dev-tech-editor mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-editor