[pLog-svn] r4188 -
plog/branches/lifetype-1.1.2/js/tinymce/plugins/insertvideo
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Thu Oct 26 07:48:01 GMT 2006
Author: oscar
Date: 2006-10-26 07:48:00 +0000 (Thu, 26 Oct 2006)
New Revision: 4188
Modified:
plog/branches/lifetype-1.1.2/js/tinymce/plugins/insertvideo/editor_plugin.js
Log:
fix so that the plugin code does not interfere with other Flash objects
Modified: plog/branches/lifetype-1.1.2/js/tinymce/plugins/insertvideo/editor_plugin.js
===================================================================
--- plog/branches/lifetype-1.1.2/js/tinymce/plugins/insertvideo/editor_plugin.js 2006-10-25 12:12:44 UTC (rev 4187)
+++ plog/branches/lifetype-1.1.2/js/tinymce/plugins/insertvideo/editor_plugin.js 2006-10-26 07:48:00 UTC (rev 4188)
@@ -117,11 +117,17 @@
objectTag = content.substring(startPos,endPos);
attribs = TinyMCE_insertvideoPlugin._parseAttributes( objectTag );
- var cssClass = "";
- if( getVideoType( attribs["data"] ) == 1 )
- cssClass = "ltVideoGoogleVideo";
- else
- cssClass = "ltVideoYouTube";
+ var cssClass = "";
+ if( attribs["data"] == undefined ) {
+ startPos++;
+ continue;
+ }
+ else {
+ if( getVideoType( attribs["data"] ) == 1 )
+ cssClass = "ltVideoGoogleVideo";
+ else
+ cssClass = "ltVideoYouTube";
+ }
// Insert image
@@ -135,30 +141,6 @@
startPos++;
}
-
- // Parse all embed tags and replace them with images from the embed data
- /*var index = 0;
- while ((startPos = content.indexOf('<object', startPos)) != -1) {
- if (index >= embedList.length)
- break;
-
- var attribs = embedList[index];
-
- // Find end of embed
- endPos = content.indexOf('>', startPos);
- endPos += 9;
-
- // Insert image
- var contentAfter = content.substring(endPos);
- content = content.substring(0, startPos);
- content += '<img width="' + attribs["width"] + '" height="' + attribs["height"] + '"';
- content += ' src="' + (tinyMCE.getParam("theme_href") + '/images/spacer.gif') + '" title="' + attribs["src"] + '"';
- content += ' alt="' + attribs["src"] + '" class="'+attribs["class"]+'" />' + content.substring(endPos);
- content += contentAfter;
- index++;
-
- startPos++;
- }*/
break;
@@ -282,8 +264,10 @@
{
if( url.substring( 0, 24 ) == "http://video.google.com/" )
return 1;
- else
+ else if( url.substring( 0, 23 ) == "http://www.youtube.com/" )
return 2;
+ else
+ return 0;
}
tinyMCE.addPlugin("insertvideo", TinyMCE_insertvideoPlugin );
\ No newline at end of file
More information about the pLog-svn
mailing list