Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
#3 | wysiwyg-doubleclick_placeholders_in_ckeditor-490414-3.patch | 751 bytes | jmuzz |
Comments
Comment #1
sunLooks 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.
Comment #2
TwoDSounds 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.
Comment #3
jmuzz CreditAttribution: jmuzz commentedIt didn't seem to work when I tried to do it by setting evt.data.dialog like the common examples show.
Comment #4
das-peter CreditAttribution: das-peter at Cando commentedThat seems to work nicely.