Reply to thread

I have actually made a tweak that would suppress this error (mostly for the deferred init case), but based on your code, I'd say this is probably more of a bug in the calling code.


First, you likely want to call the onComplete closure that's passed into your setupHtmlInsert callback manually. (It's passed as the 3rd argument, you can see a few examples of this in XF.) You'd want to do it after the appendTo call. This will trigger the element activations that you're relying on a little earlier (it does end up implicitly happening because of some lower level code), but you'd generally want to trigger it if you are triggering actions against the content you just inserted.


Second, you probably do need to consider a setTimeout call or similar approach because you take action on the editor as the initialization may be asynchronous. (Doing this sort of ends up meaning that the onComplete stuff I talked about likely ends up being moot.)


Overall, there isn't really anything to change on our end. It's possible this may be specific to 2.2, but that would be related to the Froala update and it may have made internal initialization changes (and your code may have been relying on the previous behavior).


Back
Top Bottom