Ticket #4399 (closed New Feature: fixed)

Opened 6 years ago

Last modified 5 years ago

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.


4399.patch (558 bytes) - added by wwalc 5 years ago.

Change History

Changed 5 years ago by wwalc

comment:1 Changed 5 years ago by wwalc

  • Keywords Confirmed Review? added
  • Version set to 3.0
  • Milestone set to CKEditor 3.2

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:

window.opener.CKEDITOR.tools.callFunction( funcNum, fileUrl, function() {
  var element, dialog = this.getDialog();
  element = dialog.getContentElement( 'info', 'txtAlt' );
  if ( element )
    element.setValue( alt );
  [return false;]

comment:2 Changed 5 years ago by fredck

  • Owner set to wwalc

comment:3 Changed 5 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 5 years ago by wwalc

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