Hi,
I've also come across the ajaxtoolkit issue and have a work around that gets it working, at least on the pages I have encountered. Since I've seen this a few times on the forum I thought I'd post.
Note, I use Chrome and have to drag and drop images in. I haven't looked at why the select button doesn't work yet.
The fix is based on these two articles I found:
http://ajaxcontroltoolkit.codeplex.com/workitem/27307
http://stephenwalther.com/archive/2012/05/01/ajax-control-toolkit-may-2012-release
General & Product Pages
The articles suggest that the issue is the htmleditor being in a hidden panel on page load. Since the actual editor is hidden by CSS in _HTMLEditor.ascx we are able to set the Visible = True property on the _LanguageContent.ascx page.
It is at the bottom:
<_user:HTMLEditor ID="_UC_Editor" runat="server" Visible="true" />
Next, the event handler didn't work for me in _HTMLEditor.ascx.vb so I made modifications to the function ajaxFileUpload_OnUploadComplete:
Protected Sub ajaxFileUpload_OnUploadComplete(sender As Object, e As AjaxControlToolkit.AjaxFileUploadEventArgs) Dim strFullPath As String = strFilesFolder & e.FileName htmlEditorExtender1.AjaxFileUpload.SaveAs(Server.MapPath(strFullPath)) e.PostedUrl = KartSettingsManager.GetKartConfig("general.webshopurl") + strFullPath.Replace("~/", "") End Sub
The above two changes should get it working in general.
Custom Pages
Fixing the custom page editor took a few more steps.
The extra problem here is that the editor is inside another hidden panel. I.e. even though visible is now true in _LanguageContent.ascx the panel containing this is still hidden. The article suggests a "ghost" editor which sits inside a hidden div on the page outside of any hidden panels.
Therefore, at the top of _CustomPages.ascx just under the Register tag I added this:
<div style="display:none"> <_user:LanguageContainer ID="ghost_UC_LangContainer" runat="server" /> </div>
Then you need to hook up the code behind Page_Load function. The extra challenge is to remove the required validation on the ghost editor. For this I changed the LANG_ELEM_TABLE_TYPE to PromotionStrings; just because it contains a htmleditor but doesn't require validation.
The final code change looks like this (it is at the bottom of Page_Load in _CustomPages.ascx.vb)
If GetPageID() = 0 Thenghost_UC_LangContainer.CreateLanguageStrings(LANG_ELEM_TABLE_TYPE.PromotionStrings, True)_UC_LangContainer.CreateLanguageStrings(LANG_ELEM_TABLE_TYPE.Pages, True)Else ghost_UC_LangContainer.CreateLanguageStrings(LANG_ELEM_TABLE_TYPE.PromotionStrings, False, GetPageID())_UC_LangContainer.CreateLanguageStrings(LANG_ELEM_TABLE_TYPE.Pages, False, GetPageID()) End If
That should be all for the custom pages.
I hope that is helpful, if it is not clear (I hope the code displays ok) let me know and I will try to explain it better. It feels like a bit of a hack, and there maybe a better solution, if you know it let me know.
Thanks
Craig