From fckeditor.module:

// Open the image_assis dialog on double click.
FCKImageAssistProcessor.OnDoubleClick = function( span ) {
  if ( span.tagName == 'IMG' && span._fckimgassist_fckimgassist ) {
    FCKCommands.GetCommand( 'Img_Assist' ).Execute() ;
  }
}

That, I find cool UX. Can we achieve this, too? If so, how?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sun’s picture

Looks like all we'd have to do is to have Drupal plugins return their (own) plugin name instead of true? Or similar?

If the editor supports onDoubleClick, we just invoke all of our plugins' .isNode() methods, break if one returns true, check whether that one implements a dialog (edit method?), and invoke that if so.

TwoD’s picture

Sounds simple enough. Maybe we could even add our own double click handler for those editors normally not supporting it. I won't be back on my dev machine until after the weekend so I can't test this on myself yet.

jmuzz’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Issue summary: View changes
Status: Active » Needs review
FileSize
751 bytes

It didn't seem to work when I tried to do it by setting evt.data.dialog like the common examples show.

das-peter’s picture

Status: Needs review » Reviewed & tested by the community

That seems to work nicely.