I developed a custom upload control (umbraco usercontrol wrapper .ascx) for use in the Media section. The control works fine, saves the image, it's thumbnail, update properties, etc. But in the TinyMCE editor, in the "Insert Link" window, the media I've uploaded points to a null page: /umbraco/plugins/tinymce3/null.
If I change the datatype back to umbraco's default upload control, it works as expected. Obs: In the TinyMCE "Insert Image" window this problem doesn't occur.
I found the solution by myself while searching the source code. Here it goes...
We
must add the Guid of the custom control in the static list
"LinkableMediaDataTypes" at "umbraco.loadMedia" class. This tells the
WYSIWYG editor that it's media type is "linkable".
Well... I don't know if what I did is correct or elegant, but I put this line in the "insertLink.aspx" file:
Custom upload control: problem with TinyMCE v3
Hi.
I developed a custom upload control (umbraco usercontrol wrapper .ascx) for use in the Media section. The control works fine, saves the image, it's thumbnail, update properties, etc. But in the TinyMCE editor, in the "Insert Link" window, the media I've uploaded points to a null page: /umbraco/plugins/tinymce3/null.
If I change the datatype back to umbraco's default upload control, it works as expected. Obs: In the TinyMCE "Insert Image" window this problem doesn't occur.
So, I developed a second custom upload control, copying from the umbraco source code (http://umbraco.codeplex.com/SourceControl/changeset/view/45714#450950). I give it a unique GUID, etc. Its working, but the same problem occurs.
Is this a bug? The TinyMCE "Insert Link" window accepts only media uploaded with umbraco default upload control?
Thanks!
Fernando
Hi.
I found the solution by myself while searching the source code. Here it goes...
We must add the Guid of the custom control in the static list "LinkableMediaDataTypes" at "umbraco.loadMedia" class. This tells the WYSIWYG editor that it's media type is "linkable".
Well... I don't know if what I did is correct or elegant, but I put this line in the "insertLink.aspx" file:
If anyone knows a better way, I would appreciate.
Fernando
Umbraco 4.5.2
is working on a reply...