Opened 16 years ago
Closed 16 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)
Change History (8)
comment:1 Changed 16 years ago by
Keywords: | Confirmed added |
---|---|
Owner: | set to Martin Kou |
Status: | new → assigned |
Version: | → SVN |
comment:2 Changed 16 years ago by
Keywords: | Review? added |
---|
Changed 16 years ago by
Attachment: | 3136.patch added |
---|
comment:3 Changed 16 years ago by
Keywords: | Review- added; Review? removed |
---|---|
Owner: | changed from Martin Kou to Frederico Caldeira Knabben |
Status: | assigned → new |
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 16 years ago by
Attachment: | 3136_2.patch added |
---|
comment:4 Changed 16 years ago by
Keywords: | Review? added; Review- removed |
---|---|
Status: | new → assigned |
This new patch simply uses the original element for the first range, cloning it only if there is a multiple selection.
comment:5 Changed 16 years ago by
Keywords: | Review+ added; Review? removed |
---|
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.