Opened 15 years ago

Closed 15 years ago

#3136 closed Bug (fixed)

Image plugin - Advanced Tab's Id field is not working

Reported by: Senthil Owned by: Frederico Caldeira Knabben
Priority: Must have (possibly next milestone) Milestone: CKEditor 3.0
Component: General Version: SVN (FCKeditor) - Retired
Keywords: Oracle Confirmed Review+ Cc: Senthil

Description

Image Plugin - Advanced tab's Id field is not getting added to the editor area. Ex: I have added id as '12345' but the result in the editor source is missing the id field,

<img align="absbottom" alt="Oracle" border="10" height="41" hspace="11" src="/cache/abc.gif" vspace="33" width="145" /><br />

We have a business logic that is using this id field. Since the id field is not populated, our functionality is broken.Please fix it as early as possible.

Attachments (2)

3136.patch (2.5 KB) - added by Martin Kou 15 years ago.
3136_2.patch (439 bytes) - added by Frederico Caldeira Knabben 15 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 15 years ago by Martin Kou

Keywords: Confirmed added
Owner: set to Martin Kou
Status: newassigned
Version: SVN

comment:2 Changed 15 years ago by Martin Kou

Keywords: Review? added

The bug comes from the insertHtml handler in the wysiwygarea plugin.

The insertHtml handler in wysiwygarea tries to insert the element into every range in the selection. Since there's the possibility of inserting multiple elements, the element is cloned and thus the id is stripped before insertion.

That does not make sense for dialogs that intend to only insert one element and would define an id for that element, however. So the insertHtml handler in wysiwygarea should be simplified to insert the element to the last range in the selection, and there should be no cloning.

Changed 15 years ago by Martin Kou

Attachment: 3136.patch added

comment:3 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed
Owner: changed from Martin Kou to Frederico Caldeira Knabben
Status: assignednew

This is actually a unique feature in V3. It's up to the end user to decide whether it's useful or not.

The problem with the proposed patch is that multiple selections are still selected after executing the function. It should at least delete the contents.

I have a quite simple proposal for it. I'm taking over the ticket so you can check it.

Changed 15 years ago by Frederico Caldeira Knabben

Attachment: 3136_2.patch added

comment:4 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review? added; Review- removed
Status: newassigned

This new patch simply uses the original element for the first range, cloning it only if there is a multiple selection.

comment:5 Changed 15 years ago by Martin Kou

Keywords: Review+ added; Review? removed

comment:6 Changed 15 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: assignedclosed

Fixed with [3244].

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