1. 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

Discussion in 'Resolved Bug Reports' started by rellect, Apr 4, 2014.

  1. rellect

    rellect 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:
    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 :)
  2. Mike

    Mike XenForo Developer Staff Member

    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.

Share This Page