Thanks Shane
I have a couple of other questiosn about the HTML provider.
1. any thoughts on the ManageUploadDirectory function.
I have posted this in ardvark - issue 519
I came across this when creating a HTML provider for the telerik control.
Images appear fine in Edit and preview but show up as a red x in view mode
Bug Description – The telerik editor adds images with relative links and will automatically add the portal directory when adding images. For example <IMG src="Portals/0/approved_508.gif" border=0> The ManageUploadDirectory function on HtmlModule.ascx.vb causes this. This function parses the HTML data and examines all tags that have a src attribute. If the path does not start with a “/” the function adds the portal upload directory path to any tags. Since the telerik tags do not have a leading “/” the portal upload path is re-added. This fix will need to be addressed if the telerik editor is used to select files from a folder other than the portals upload directory.
Fix – Edit the ManageUploadDirectory functions also check if the upload path is part of the image path, if so skip it. Line 107 of HtmlModule.ascx.vb
'If InStr(1, strSRC, "://") = 0 And Left(strSRC, 1) <> "/" Then
If InStr(1, strSRC, "://") = 0 And Left(strSRC, 1) <> "/" And strSRC.IndexOf(strUploadDirectory.Substring(strUploadDirectory.IndexOf("Portals/"))) = -1 Then
2. Access the containing module control. I currently use the following code
Dim modulecontrol As PortalModuleControl = FindControlRecursive(Me.HtmlEditorControl, "ModuleContent").Controls(0)
Is this the correct way to do this?
Bert
bert