Opened 6 years ago

Closed 6 years ago

#4399 closed New Feature (fixed)

return caption/alt text to Image plugin from file browser

Reported by: kae.verens Owned by: wwalc
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 wwalc 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by wwalc

comment:1 Changed 6 years ago by wwalc

  • Keywords Confirmed Review? added
  • Milestone set to CKEditor 3.2
  • Version set to 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 6 years ago by fredck

  • Owner set to wwalc

comment:3 Changed 6 years ago by alfonsoml

  • 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 6 years ago by wwalc

  • Keywords Doc? removed
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
© 2003 – 2015 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy