This is a migrated thread and some comments may be shown as answers.

RadEditor for MOSS 2007

1 Answer 72 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Erwin
Top achievements
Rank 1
Erwin asked on 09 May 2008, 02:41 AM
Hi,

I tried to implement the following in MOSS 2007, but it didn't seem to work:

    var documentManagerCommand = RadEditorCommandList["TemplateManager"];
    RadEditorCommandList["DocumentManager"] = function(commandName, editor, oTool)
    {
        documentManagerCommand (commandName, editor, callBackFn);
        function callBackFn(retValue)
        {
            if (retValue.href)
            {
                editor.PasteHtml("<IMG src='./images/" + retValue.href.substring(retValue.href.lastIndexOf(".")+1) + ".gif' /><a href='" + retValue.href + "'>" + retValue.href.substring(retValue.href.lastIndexOf("/") + 1) + "</a>");
            };
        }
    };
What I am trying to achieve is to display an icon in front of the filename whenever after I upload the file using the document manager.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Erwin
Top achievements
Rank 1
answered on 09 May 2008, 03:30 AM
Ignore my previous post as I had managed to fix the issue.
Tags
WebParts for SharePoint
Asked by
Erwin
Top achievements
Rank 1
Answers by
Erwin
Top achievements
Rank 1
Share this question
or