Fixed the editor not loading here in the next build. This occurs if the File Browser button is available in editors generally, but if there are no editors present on the current page, and an editor gets added via an AJAX response. In this case, it is possible for the Javascripts to load out of order. If the XenForo JS loads before the VW JS, the VW editor functions are not available yet and errors will be thrown. Due to the page being loaded already, events like documentReady are not possible to resolve the situation (documentReady already fired, so XenForo's editor script is "activating" immediately, before the AJAX response has finished parsing other scripts).
In order to get the editor to load successfully, in
js/vw/vw/xf2/froala/final.js, find:
Code:
vw_Hard_Core.setup('platform-editor', 'vw_Editor_Platform', '');
BEFORE it, add:
Code:
if (typeof(vw_Hard_Core) == 'undefined') return;
In this situation, you will probably still have difficulty using some editor buttons like the File Browser, even if the editor loads successfully. Generally it is recommended that the container page already has the various basic Javascript libraries loaded (xenforo.js, jquery, YUI3, vw_Hard_Core, etc) as part of the main document to prevent problems like this. We will probably force vw_Hard_Core on all pages in VW 4.2 to resolve this, after we remove the bulky YUI3 dependency. In the mean time, you will probably need to accept that wiki-button functionality will be spotty in Member Notes and other non-core editors.