XenForo.AttachmentInserter (attachment_editor.js) is the function that adds attachments into the editor.
This function a little problematic as it's limited to one editor in a form:
If you have multiple editors in a form, it will always add the attachments to the first editor.
As for now there is no page in xenforo that uses multiple editors (except in the resources, but there is only one editor that can have attachments), so this is not a direct bug. But it affects 3rd party development so hope it will be fixed
This function a little problematic as it's limited to one editor in a form:
HTML:
var editor = XenForo.getEditorInForm($trigger.closest('form'), ':not(.NoAttachment)');
If you have multiple editors in a form, it will always add the attachments to the first editor.
As for now there is no page in xenforo that uses multiple editors (except in the resources, but there is only one editor that can have attachments), so this is not a direct bug. But it affects 3rd party development so hope it will be fixed