I understand that every post is written as a markdown that is being plugged into a default html (same for every post).
The href link, which enables automatic scroll down to a linked id is working on the main page. However, as soon as I click on a modal (html + markdown) the href links will not work in it. I do not know what is the reason for that.
I created my own table of contents using html and want it to scroll to a specific id on a click of one of the table cells.
Do you have a live example? of the actual website without it being commented out?
Maybe modals don’t support that type of href? this might be an issue, not sure what it would do if the anchor was outside the modal?
your use of a modal for that page seems to me to not be wise - modals are not meant to have that much info as I understand them. Is there a reason why you want it to be in a modal? the modal is full screen from what I could tell anyways, not sure why it would not just be a normal page.
But outside of it being in a modal and if that is proper or not, I would do the same thing on a normal page to see if that works, and if not I would focus on getting that to work first just in case the modal part is an issue.