zhenyong97 / flask-mdeditor

A Markdown Editor as Flask extention
MIT License
18 stars 6 forks source link

Conflict with Bootstrap modal #6

Open kozmik-moore opened 6 months ago

kozmik-moore commented 6 months ago

I have been able to get the demo version of this working but cannot get it to work properly with my project.

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

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.

I am using Flask 2.3.3, Bootstrap 5.3.2, and Flask-MDEditor 0.1.5.

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

kozmik-moore commented 6 months ago

Thanks for responding. Does this address the conflict with Bootstrap 5?

On Mon, Feb 12, 2024, 07:58 ZISC @.***> wrote:

Hi, @kozmik-moore https://github.com/kozmik-moore It seems that the issue with running the demo was caused by inadequate instructions in my README document and problems with the requirement.txt file. I will take some time later to improve the documentation

1- please update the requirement.txt and reinstall the package.

blinker==1.7.0 click==8.1.7 Flask==2.3.3 Flask-MDEditor==0.1.5 Flask-SQLAlchemy==3.1.1 Flask-WTF==1.2.1 greenlet==3.0.3 itsdangerous==2.1.2 Jinja2==3.1.3 MarkupSafe==2.1.5 mistune==3.0.2 python-dotenv==1.0.1 SQLAlchemy==2.0.26 typing_extensions==4.9.0 Werkzeug==3.0.1 WTForms==3.1.2

2- run the command to init the database

flask run initdb

finally run the project,

flask run

— Reply to this email directly, view it on GitHub https://github.com/zhenyong97/flask-mdeditor/issues/6#issuecomment-1938978503, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACWIDAPIMRGOJGAWYHHLEUTYTI32BAVCNFSM6AAAAABDDYO5VWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZYHE3TQNJQGM . You are receiving this because you were mentioned.Message ID: @.***>

zhenyong97 commented 6 months ago

@kozmik-moore I apologize for the confusion. I misunderstood your initial question regarding the issue with running the demo. Based on the clues you provided, I personally don't think the issue lies with Bootstrap. If it's convenient for you, could you please share the relevant code snippet? This will help me better understand the problem and provide you with more accurate assistance.