Sorry, but the shortcode does not do active heading highlighting, only the widget has that feature.
I’m using elementor and have tried using the [toc] shortcode in my layout but none of the links work, is this a bug?
I’ve also tried adding the WP widget from elementary but this also does not work.
When I insert as normal it works fine, but this breaks my design.
This is a great plugin BTW, really keen to give it 5 stars.
Please, in the future, open you own support ticket, do not add to someone elses, especially one marked as resolved.
RE: I’m using elementor and have tried using the [toc] shortcode in my layout but none of the links work, is this a bug?
Best guess, since there are multiple ways to do the same thing in Elementor, is where and how you are adding the headings. If you are using the Elementor Heading block, that should work fine. If it is not, are there special characters in your headings, for example anything other than a-z or A-Z characters. Extended characters can cause issue if the page builder does not encoded them the same way that the WP Editor does. This is important because ezTOC will search for headings to insert the in page links based on how the WP editors encode extended characters.
RE: I’ve also tried adding the WP widget from elementary but this also does not work.
The TOC included in Elementor is Elementor’s TOC solution which has nothing to do with ezTOC.
If both ezTOC and Elementor’s TOC block do not work, that would be puzzling.
RE: When I insert as normal it works fine, but this breaks my design.
Sorry, I do understand what you mean by “insert as normal”.