Getting Flask-MDEditor to work with Bootstrap 5

I am trying to get the Flask-MDEditor extension working with Bootstrap. I have been able to get the demo version (sans-Bootstrap) working but cannot get it to work properly within my project.

I am using Flask 2.3.3, Bootstrap 5.3.2, and Flask-MDEditor 0.1.5. Besides this issue with Flask-MDEditor, my project works otherwise and does not throw any errors.

I am a bit of a noob when it comes to JS and CSS, so any help is appreciated.

The basic implementation seems to work until rendering time. Placing the editor field inside of a form in the modal div seems to break the modal, as it never appears when called; placing it in a form outside of the modal works.

Inspecting the code in the browser (Firefox) reveals an error that repeats 4 times: `Uncaught TypeError: Element.prototype.querySelectorAll is undefined`. Following that error takes me to Bootstrap’s `selector-engine.js`. After that, I do not know what to check or what should happen.

Disabling the Bootstrap CSS allows the editor to be displayed properly both inside and outside the modal div but does not get rid of the JS errors: disabling Bootstrap’s JS does.

I’ve checked that the CSS and JS for the mdeditor field are after the CSS and JS for Bootstrap.