Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Need MediaBin URL for TinyMCE in TS 7.3.1
que_giro
My client has customized the TS 6.7.2 TinyMCE rich-text editor to import MediaBin images. I'm trying to implement that same functionality in TS 7.3.1, but the following URL, which works in TS 6.7.2, doesn't seem to work in TS 7.3.1:
/iw-cc/vf_mediabin_import.jsp?ceiling='+dcrpath+'&hier_callback=window.opener.getMediabinAsset&method=import&vpath='+dcrpath
Incidentally, the version of MediaBin is 7.2.2.
Suggestions?
Thanks,
S.
Find more posts tagged with
Comments
que_giro
Problem solved. I needed to copy vf_mediabin_import.jsp from TS 6.7.2 to TS 7.3.1 (under
\Interwoven\TeamSite\local\config\lib\content_center\customer_src\web) and run make_toolkit.ipl.
This file (vf_mediabin_import.jsp) is a copy of this file:
http://devnet.interwoven.com/site.fcgi/techlib/att/055654/6646/ecm_mediabin_import.jsp.txt
.
There's an article (# 55654) in the Autonomy Knowlege Base called "HowTo: Integrate MediaBin with LiveSite using the ECM Connector 2.0." This article refers to the same JSP file above (ecm_mediabin_import.jsp).
Of course, I also needed to migrate the TinyMCE customizations from TS 6.7.2 to TS 7.3.1. For example, I had to copy the function below to
\Interwoven\TeamSite\httpd\iw\tinymce\jscripts\tiny_mce\themes\advanced\editor_template_src.js.
S.
//function to complete MediaBin Import
function getMediabinAsset(vpath,assetPath){
var editor_id = tinyMCE.selectedInstance.editorId
var indexOfExtn = assetPath.lastIndexOf(".");
var extn = assetPath.substring(indexOfExtn+1,assetPath.length);
var code = "";
if(extn == 'jpg' || extn == 'jpeg' || extn == 'gif' || extn == 'pic' || extn == 'bmp' || extn == 'png')
{
code = "<" + "img alt='' src='"+assetPath+"' border='0'>";
tinyMCE.execInstanceCommand(editor_id, 'mceInsertRawHTML', false, code);
}else if(extn == 'doc' || extn == 'pdf' || extn == 'xls' || extn == 'ppt' || extn == 'txt' || extn == 'rtf' || extn == 'msg' || extn == 'htm' || extn == 'html' || extn == 'xml'|| extn == 'ps'|| extn == 'pps' || extn == 'css' || extn == 'avi' || extn == 'wmv'|| extn == 'docx'|| extn == 'xlsx'|| extn == 'pptx'||extn == 'exe')
{
code = "<" + "a href='"+assetPath+"'>"+assetPath+"";
tinyMCE.execInstanceCommand(editor_id, 'mceInsertRawHTML', false,code);
}
else if(extn == 'swf')
{
code = "SWF flash='"+assetPath+"'
";
tinyMCE.execInstanceCommand(editor_id, 'mceInsertRawHTML', false,code);
}
else if (extn == 'flv')
{
code = "FLV flash='"+assetPath+"'
";
tinyMCE.execInstanceCommand(editor_id, 'mceInsertRawHTML', false,code);
}
}