Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-11552

height and width of embedded movies is changed to 32 by Rich Text Editor

      Embed media files such as *.mpeg or *.swf, and set the height and width to a set value. The image is saved with these dimensions but when opened again in rich text edit mode, the size reverts back to 32x32

      This behaviour does not apply to *.png, *.jpeg images.

      wiki-markup to reproduce:

      !<filename>.mpeg|width=200,height=200!
      

            [CONFSERVER-11552] height and width of embedded movies is changed to 32 by Rich Text Editor

            This has been merged to trunk,

            Andrew Lynch (Inactive) added a comment - This has been merged to trunk,

            Thats a clever workaround Guillermo.

            However I don't want to let Confluence off the hook. This is a supported function in Confluence and frankly the bug renders it almost useless.

            My attitude is that they should not promote a feature that fundamentally does not work as advertised.

            Phil

            Philip Parkinson added a comment - Thats a clever workaround Guillermo. However I don't want to let Confluence off the hook. This is a supported function in Confluence and frankly the bug renders it almost useless. My attitude is that they should not promote a feature that fundamentally does not work as advertised. Phil

            Guillermo Chutrau added a comment - - edited

            My poor boy work around this, has been to create a very small "wikipart" or wiki page with the

            !xxxxx.swf|width=200,height=200!
            

            I block users from editing this webpart, avoiding the rich editor issue. I also pute it somewhere aside from Home, or any of its children pages, so I wont be listed in any "table of contents".

            Then, I display it in the mainpage with the include macro:

            {include:wikipart}
            

            let me know if this worked for you. Cheers, gchutrau

            Guillermo Chutrau added a comment - - edited My poor boy work around this, has been to create a very small " wikipart " or wiki page with the !xxxxx.swf|width=200,height=200! I block users from editing this webpart, avoiding the rich editor issue. I also pute it somewhere aside from Home, or any of its children pages, so I wont be listed in any "table of contents". Then, I display it in the mainpage with the include macro: {include:wikipart} let me know if this worked for you. Cheers, gchutrau

            We have been having all sorts of issues with FP10 that has resulted in our developers needing to switch from using html macros to run flash to the heavily promoted multmedia macro.

            Now we are dealing with this issue, why has this been unfixed since May 2008?

            I keep seeing new features going into confluence but some serious bugs just never seem to get actioned.

            Philip Parkinson added a comment - We have been having all sorts of issues with FP10 that has resulted in our developers needing to switch from using html macros to run flash to the heavily promoted multmedia macro. Now we are dealing with this issue, why has this been unfixed since May 2008? I keep seeing new features going into confluence but some serious bugs just never seem to get actioned.

            This issue has also been reported as "Rich Text Editor resets dimensions of flash (swf) files". This comment is to help searches.

            Don Willis added a comment - This issue has also been reported as "Rich Text Editor resets dimensions of flash (swf) files". This comment is to help searches.

            Please remove me from the support tickets we have found a much better product with much better support.

            Kevin Forney added a comment - Please remove me from the support tickets we have found a much better product with much better support.

            Aaron Timko added a comment - - edited


            And, might as well post this one, too, which does a nice show/hide feature.

            The macro seems to be reliable (tested Firefox3 on Mac OS X 10.5.5, with Google Code's PDF viewing plugin)

            And 'randomvar' is an integer to ensure your CSS ids are different from other potential ids (instead of just 1, 2, 3, etc.)


            User macro called "pdf" with "Macro has a body" disabled, the output set to "Macro generates HTML markup":

            #set($globalHelper=$action.getGlobalHelper())
            #set($height = 800)
            #set($width = 87)
            
            #set($id = 1)
            #set($randomvar = 314)
            
            
            
            #if( $paramheight )
                 #set($height = $paramheight )
            #end
            
            #if( $paramwidth )
                 #set($width = $paramwidth )
            #end
            
            #if( $paramid )
                 #set($id = $paramid )
            #end
            
            <SCRIPT type="text/javascript">
            function adjust_embed_size(id) // ID of your embed tag
            {
              var vid=document.getElementById(id);
              if( 'visible' == vid.style.visibility )
              {
                vid.style.width='0';
                vid.style.height='0';
                vid.style.visibility = 'hidden'
              }
              else
              {
                vid.style.width='$!{width}%';
                vid.style.height='$!{height}px';
                vid.style.visibility = 'visible'
              }
            }
            </SCRIPT>
            <INPUT onclick="adjust_embed_size($!{randomvar}$!{id});value=('View'==value?'Hide':'View')" type="button" value="View"></INPUT>
            
            #set($renderedContent=$globalHelper.renderConfluenceMacro("!${param0}|style=visibility=hidden,id=$!{randomvar}$!{id}!")) 
            
            ${renderedContent}
            




            Usage:

            {pdfshowhide:filename.pdf|id=2} {pdfshowhide:filename.pdf|id=3|width=100|height=1000}



            Aaron Timko added a comment - - edited And, might as well post this one, too, which does a nice show/hide feature. The macro seems to be reliable (tested Firefox3 on Mac OS X 10.5.5, with Google Code's PDF viewing plugin) And 'randomvar' is an integer to ensure your CSS ids are different from other potential ids (instead of just 1, 2, 3, etc.) User macro called "pdf" with "Macro has a body" disabled, the output set to "Macro generates HTML markup": #set($globalHelper=$action.getGlobalHelper()) #set($height = 800) #set($width = 87) #set($id = 1) #set($randomvar = 314) # if ( $paramheight ) #set($height = $paramheight ) #end # if ( $paramwidth ) #set($width = $paramwidth ) #end # if ( $paramid ) #set($id = $paramid ) #end <SCRIPT type= "text/javascript" > function adjust_embed_size(id) // ID of your embed tag { var vid=document.getElementById(id); if ( 'visible' == vid.style.visibility ) { vid.style.width= '0' ; vid.style.height= '0' ; vid.style.visibility = 'hidden' } else { vid.style.width= '$!{width}%' ; vid.style.height= '$!{height}px' ; vid.style.visibility = 'visible' } } </SCRIPT> <INPUT onclick= "adjust_embed_size($!{randomvar}$!{id});value=( 'View' ==value? 'Hide' : 'View' )" type= "button" value= "View" ></INPUT> #set($renderedContent=$globalHelper.renderConfluenceMacro( "!${param0}|style=visibility=hidden,id=$!{randomvar}$!{id}!" )) ${renderedContent} Usage : {pdfshowhide:filename.pdf|id=2} {pdfshowhide:filename.pdf|id=3|width=100|height=1000}

            Thanks very much for the code.

            We had the same issue with embedding PDFs.

            I altered your code so that you have default width and height, but this can be changed by the user.
            Couldn't get the percentage to work through defining it (errors abounded), so I left it as a number, and added the percentage sign within the macro itself.

            User macro called "pdf" with "Macro has a body" disabled, the output set to "Macro generates HTML markup":

            #set($globalHelper=$action.getGlobalHelper())
            #set($height = 800)
            #set($width = 87)
            
            #if( $paramheight )
                 #set($height = $paramheight )
            #end
            
            #if( $paramwidth )
                 #set($width = $paramwidth )
            #end
            
            #set($renderedContent=$globalHelper.renderConfluenceMacro("!${param0}|width=$!{width}%,height=$!{height}!")) 
            
            ${renderedContent}
            



            Usage:

            {pdf:filename.pdf}
            {pdf:filename.pdf|width=100|height=600}

            Aaron Timko added a comment - Thanks very much for the code. We had the same issue with embedding PDFs. I altered your code so that you have default width and height, but this can be changed by the user. Couldn't get the percentage to work through defining it (errors abounded), so I left it as a number, and added the percentage sign within the macro itself. User macro called "pdf" with "Macro has a body" disabled, the output set to "Macro generates HTML markup": #set($globalHelper=$action.getGlobalHelper()) #set($height = 800) #set($width = 87) # if ( $paramheight ) #set($height = $paramheight ) #end # if ( $paramwidth ) #set($width = $paramwidth ) #end #set($renderedContent=$globalHelper.renderConfluenceMacro( "!${param0}|width=$!{width}%,height=$!{height}!" )) ${renderedContent} Usage : {pdf:filename.pdf} {pdf:filename.pdf|width=100|height=600}

            Cody Hatch added a comment -

            Since we need to embed a lot of small quicktime clips into Confluence pages this isse has been fairly serious for us. We have developed a workaround for this issue as a modification of the autoplay workaround document here.

            We've created a user macro called "media" with "Macro has a body" disabled, the output set to "Macro generates HTML markup", and the following contents:

            #set($globalHelper=$action.getGlobalHelper())
            #if( $param2 )
                #set($height=$generalUtil.convertToInteger($param2))
                #set( $height = $height + 16 )
            #end
            #set($renderedContent=$globalHelper.renderConfluenceMacro("!${param0}|width=$!{param1},height=$!{height}!").replaceAll("<embed","<param name='autoplay' value='false'><embed autoplay='false'")) 
            
            ${renderedContent}

            Now if we call {media:filename.mov|320|240} we get an embedded movie with autoplay off and dimensions of 320 x 240 which the Rich Text Editor won't corrupt. Not sure if it's applicable to the problems others are running into, but it solves our core issue.

            Cody Hatch added a comment - Since we need to embed a lot of small quicktime clips into Confluence pages this isse has been fairly serious for us. We have developed a workaround for this issue as a modification of the autoplay workaround document here . We've created a user macro called "media" with "Macro has a body" disabled, the output set to "Macro generates HTML markup", and the following contents: #set($globalHelper=$action.getGlobalHelper()) # if ( $param2 ) #set($height=$generalUtil.convertToInteger($param2)) #set( $height = $height + 16 ) #end #set($renderedContent=$globalHelper.renderConfluenceMacro( "!${param0}|width=$!{param1},height=$!{height}!" ).replaceAll( "<embed" , "<param name= 'autoplay' value= ' false ' ><embed autoplay= ' false ' " )) ${renderedContent} Now if we call {media:filename.mov|320|240} we get an embedded movie with autoplay off and dimensions of 320 x 240 which the Rich Text Editor won't corrupt. Not sure if it's applicable to the problems others are running into, but it solves our core issue.

            We're experiencing the same issue with avi files under v2.8.1.
            The change takes place when you switch from the Wiki Markup view to the Rich Text editor.

            Donna Hrynkiw added a comment - We're experiencing the same issue with avi files under v2.8.1. The change takes place when you switch from the Wiki Markup view to the Rich Text editor.

              don.willis@atlassian.com Don Willis
              ganand Gurleen Anand [Atlassian]
              Affected customers:
              7 This affects my team
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: