• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

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

rellect

Well-known member
#1
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 :)
 

Mike

XenForo developer
Staff member
#2
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.