bb_code_edit -> click -> image overwrite

au lait

Well-known member
Have a problem with xenforo -> bb_code_edit.js.

I would like to intercept clicks on images! Anyone have any idea / help how I can do this?

Standard in XF is line 456 to 467
Code:
            $ed.on('click', 'img', function(e) {
                redactorApi.focus();

                if ($(this).hasClass('mceSmilie') || $(this).hasClass('mceSmilieSprite')
                    || $(this).hasClass('attachFull') || $(this).hasClass('attachThumb')
                )
                {
                    e.preventDefault();
                    return;
                }

                var offset = 0, temp = this;
                while (temp.previousSibling)
                {
                    offset++;
                    temp = temp.previousSibling;
                }
                redactorApi.setSelection(this.parentNode, offset, this.parentNode, offset + 1);

                self.getImageModal(redactorApi);
            });

This I would like to overwrite - But no idea how!

Thank you
 
Top Bottom