Opened 14 years ago

Closed 14 years ago

#4399 closed New Feature (fixed)

return caption/alt text to Image plugin from file browser

Reported by: Kae Verens Owned by: Wiktor Walc
Priority: Normal Milestone: CKEditor 3.2
Component: General Version: 3.0
Keywords: Confirmed Review+ Cc:


at the moment, the filebrowser plugin only appears to set the image url in the image plugin.

however, some file browsers also allow captions to be set on their images (for example, sending back caption text stored within the image file itself).

it would be nice to select an image using a filebrowser plugin and have the image plugin fill in the Alt text from the retrieved caption.

Attachments (1)

4399.patch (558 bytes) - added by Wiktor Walc 14 years ago.

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by Wiktor Walc

Attachment: 4399.patch added

comment:1 Changed 14 years ago by Wiktor Walc

Keywords: Confirmed Review? added
Milestone: CKEditor 3.2
Version: 3.0

I think it could be even more flexible.

Suppose your file browser can return also other information that can be set in the image dialog (like link url, target etc.). One can imagine even a custom dialog with unknown fields that could be updated by a file browser.

It seems that the right way to go would be to allow passing a callback function to the setUrl function in the filebrowser plugin. This way we could do something like: funcNum, fileUrl, function() {
  var element, dialog = this.getDialog();
  element = dialog.getContentElement( 'info', 'txtAlt' );
  if ( element )
    element.setValue( alt );
  [return false;]

comment:2 Changed 14 years ago by Frederico Caldeira Knabben

Owner: set to Wiktor Walc

comment:3 Changed 14 years ago by Alfonso Martínez de Lizarrondo

Keywords: Review+ Doc? added; Review? removed

I like it. It's simple but provides full customization.

It just needs proper documentation explaining that if they return false in that function then the default processing of the returned data won't be executed.

comment:4 Changed 14 years ago by Wiktor Walc

Keywords: Doc? removed
Resolution: fixed
Status: newclosed
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