Not a bug XenForo.AttachmentInserter doesn't work with multiple editors

refael

Well-known member
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:
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 :)
 
That's actually what the "NoAttachment" class is for. However, this really isn't a bug - it's simply something that isn't something that has been a designed goal. If you have a single form that has two distinct attachment systems, you'll need to develop something to fit your needs.
 
Back
Top Bottom