Opened 12 years ago

Closed 12 years ago

#8586 closed Bug (invalid)

flash plugin does not allow percentage widths

Reported by: Jesse Beach Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

This ticket can be considered a clone of #7114.

Using Chrome 15 on Mac, CKEditor 3.5.1, working in Drupal 7 using the wysiwyg module.

  1. Add a flash embed (the embed element method, not the iframe) from Youtube to the textarea of the HTML editor.
  2. Change the HTML width attributes values for the embed/object elements to 100%.
  3. Switch to the WYSIWYG view.
  4. Save the content

result: The code saved for the embed contains width="100" not width="100%". This happens because the CKEDITOR.tools.cssLength function returns either a unitless value or a PX value. It does not preserve the units of the element's width and height attributes.

In our case, we have migrated data from a client that contains HTML that includes flash embeds with "100%" width. Whenever a node is edited, the width of the flash embed is incorrectly converted from 100% to 100, resulting is tall, skinny videos.

To resolve this locally, I created a plugin that checks the width property of embed and object elements on attach and detach of the editor. If the width is 100 and if the height is great than the width (resulting in an awkward tall, skinny flash video), I change the value of the width to be 100% so that on save, the content of the editor doesn't overwrite 100% in the database with 100.

Change History (1)

comment:1 Changed 12 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

It doesn't work in CKEditor 3.5.1 but it works in CKEditor 3.6.1 and above.

Please always use the latest software as it contains many bug fixes comparing to previous releases.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy