<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mocursor smart TOC &#8211; Moses Cursor</title>
	<atom:link href="https://mosescursor.com/tag/mocursor-smart-toc/feed/" rel="self" type="application/rss+xml" />
	<link>https://mosescursor.com</link>
	<description>Design &#124; Develop &#124; Debug</description>
	<lastBuildDate>Mon, 18 May 2026 21:46:03 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://mosescursor.com/wp-content/uploads/2023/10/cursor-logo-2-e1697566869788-150x150.png</url>
	<title>mocursor smart TOC &#8211; Moses Cursor</title>
	<link>https://mosescursor.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Mocursor Smart TOC Documentation</title>
		<link>https://mosescursor.com/mocursor-smart-toc-documentation/</link>
		
		<dc:creator><![CDATA[Moses Cursor]]></dc:creator>
		<pubDate>Mon, 11 May 2026 16:52:10 +0000</pubDate>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[MoCursor]]></category>
		<category><![CDATA[product]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[mocursor smart TOC]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[smart toc]]></category>
		<category><![CDATA[table of contents]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://mosescursor.com/?p=2739</guid>

					<description><![CDATA[Introduction Mocursor Smart TOC is a lightweight, feature-packed WordPress plugin that automatically generates a linked, navigable table of contents from the headings in your posts and pages. It works as both a native Gutenberg block and a classic shortcode. Quick Start Guide Block Editor (3 steps) Classic Editor / Shortcode The TOC will automatically detect [&#8230;]]]></description>
										<content:encoded><![CDATA[<nav class="mctoc wp-block-mctoc-toc" data-scroll-offset="80" data-show-back-to-top="0">
			<div class="mctoc__header">
			<span class="mctoc__title">Table of Contents</span>
			<button class="mctoc__toggle" aria-expanded="true" type="button">
				Hide			</button>
		</div>
		<ul class="mctoc__list">
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#introduction">
						Introduction					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#quick-start-guide">
						Quick Start Guide					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#block-editor-3-steps">
						Block Editor (3 steps)					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#classic-editor-shortcode">
						Classic Editor / Shortcode					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#key-features">
						Key Features					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#1-smart-heading-detection">
						1. Smart Heading Detection					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#2-flexible-numbering-styles">
						2. Flexible Numbering Styles					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#3-collapsible-sticky-modes">
						3. Collapsible &amp; Sticky Modes					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#4-active-heading-tracking">
						4. Active Heading Tracking					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#5-smooth-scrolling-with-offset">
						5. Smooth Scrolling with Offset					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#6-fine-grained-control">
						6. Fine-Grained Control					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#block-editor-vs-shortcode">
						Block Editor vs. Shortcode					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#shortcode-examples">
						Shortcode Examples					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#theme-integration-customization">
						Theme Integration &amp; Customization					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#accessibility-first">
						Accessibility First					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#performance-privacy">
						Performance &amp; Privacy					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#performance">
						Performance					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#privacy-gdpr-compliant">
						Privacy (GDPR Compliant)					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#requirements">
						Requirements					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#frequently-asked-questions">
						Frequently Asked Questions					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#changelog-highlights">
						Changelog Highlights					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#version-1-0-1">
						Version 1.0.1					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#version-0-1-0-initial-release">
						Version 0.1.0 (Initial Release)					</a>
				</span>
			</li>
			</ul>
	</nav>
		


<h2 id="introduction" class="wp-block-heading">Introduction</h2>



<p class="wp-block-paragraph"><strong>Mocursor Smart TOC</strong> is a lightweight, feature-packed WordPress plugin that automatically generates a linked, navigable table of contents from the headings in your posts and pages. It works as both a native Gutenberg block and a classic <code><nav class="wp-block-mctoc-toc mctoc" data-scroll-offset="80" data-show-back-to-top="0">
			<div class="mctoc__header">
			<span class="mctoc__title">Table of Contents</span>
			<button class="mctoc__toggle" aria-expanded="true" type="button">
				Hide			</button>
		</div>
		<ul class="mctoc__list">
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#introduction">
						Introduction					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#quick-start-guide">
						Quick Start Guide					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#block-editor-3-steps">
						Block Editor (3 steps)					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#classic-editor-shortcode">
						Classic Editor / Shortcode					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#key-features">
						Key Features					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#1-smart-heading-detection">
						1. Smart Heading Detection					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#2-flexible-numbering-styles">
						2. Flexible Numbering Styles					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#3-collapsible-sticky-modes">
						3. Collapsible &amp; Sticky Modes					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#4-active-heading-tracking">
						4. Active Heading Tracking					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#5-smooth-scrolling-with-offset">
						5. Smooth Scrolling with Offset					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#6-fine-grained-control">
						6. Fine-Grained Control					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#block-editor-vs-shortcode">
						Block Editor vs. Shortcode					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#shortcode-examples">
						Shortcode Examples					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#theme-integration-customization">
						Theme Integration &amp; Customization					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#accessibility-first">
						Accessibility First					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#performance-privacy">
						Performance &amp; Privacy					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#performance">
						Performance					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#privacy-gdpr-compliant">
						Privacy (GDPR Compliant)					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#requirements">
						Requirements					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#frequently-asked-questions">
						Frequently Asked Questions					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#changelog-highlights">
						Changelog Highlights					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#version-1-0-1">
						Version 1.0.1					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#version-0-1-0-initial-release">
						Version 0.1.0 (Initial Release)					</a>
				</span>
			</li>
			</ul>
	</nav>
		</code> shortcode.</p>



<ul class="wp-block-list">
<li><strong>Dynamic</strong> — Server-rendered on every page load, always reflecting the latest content.</li>



<li><strong>Lightweight</strong> — No JavaScript frameworks. Pure vanilla JS for all frontend interactivity.</li>



<li><strong>Accessible</strong> — Proper ARIA attributes, keyboard navigation, semantic HTML, and focus management.</li>



<li><strong>Theme-aware</strong> — Uses WordPress design tokens and CSS custom properties to inherit your theme&#8217;s styles.</li>



<li><strong>Privacy-friendly</strong> — No external requests, no tracking, no analytics, no cookies.</li>
</ul>



<h2 id="quick-start-guide" class="wp-block-heading">Quick Start Guide</h2>



<h3 id="block-editor-3-steps" class="wp-block-heading">Block Editor (3 steps)</h3>



<ul class="wp-block-list">
<li>Open any post or page in the block editor.</li>



<li>Click the block inserter (<strong>+</strong>), search for <strong>&#8220;Mocursor Smart TOC&#8221;</strong>.</li>



<li>Insert the block and publish. Done.</li>
</ul>



<h3 id="classic-editor-shortcode" class="wp-block-heading">Classic Editor / Shortcode</h3>



<ul class="wp-block-list">
<li>In any post, page, or widget, type: <code><nav class="wp-block-mctoc-toc mctoc" data-scroll-offset="80" data-show-back-to-top="0">
			<div class="mctoc__header">
			<span class="mctoc__title">Table of Contents</span>
			<button class="mctoc__toggle" aria-expanded="true" type="button">
				Hide			</button>
		</div>
		<ul class="mctoc__list">
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#introduction">
						Introduction					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#quick-start-guide">
						Quick Start Guide					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#block-editor-3-steps">
						Block Editor (3 steps)					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#classic-editor-shortcode">
						Classic Editor / Shortcode					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#key-features">
						Key Features					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#1-smart-heading-detection">
						1. Smart Heading Detection					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#2-flexible-numbering-styles">
						2. Flexible Numbering Styles					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#3-collapsible-sticky-modes">
						3. Collapsible &amp; Sticky Modes					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#4-active-heading-tracking">
						4. Active Heading Tracking					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#5-smooth-scrolling-with-offset">
						5. Smooth Scrolling with Offset					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#6-fine-grained-control">
						6. Fine-Grained Control					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#block-editor-vs-shortcode">
						Block Editor vs. Shortcode					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#shortcode-examples">
						Shortcode Examples					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#theme-integration-customization">
						Theme Integration &amp; Customization					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#accessibility-first">
						Accessibility First					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#performance-privacy">
						Performance &amp; Privacy					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#performance">
						Performance					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#privacy-gdpr-compliant">
						Privacy (GDPR Compliant)					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#requirements">
						Requirements					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#frequently-asked-questions">
						Frequently Asked Questions					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#changelog-highlights">
						Changelog Highlights					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#version-1-0-1">
						Version 1.0.1					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#version-0-1-0-initial-release">
						Version 0.1.0 (Initial Release)					</a>
				</span>
			</li>
			</ul>
	</nav>
		</code></li>



<li>Publish. Done.</li>
</ul>



<p class="wp-block-paragraph">The TOC will automatically detect all H2, H3, and H4 headings in your content.</p>



<h2 id="key-features" class="wp-block-heading">Key Features</h2>



<h3 id="1-smart-heading-detection" class="wp-block-heading">1. Smart Heading Detection</h3>



<p class="wp-block-paragraph">The plugin scans your content for H2, H3, and H4 elements. If a heading already has an HTML anchor (ID), it uses that. If not, it generates one automatically from the heading text. Duplicate IDs get smart suffixes to keep everything functional.</p>



<h3 id="2-flexible-numbering-styles" class="wp-block-heading">2. Flexible Numbering Styles</h3>



<p class="wp-block-paragraph">Choose from three numbering styles to match your content structure:</p>



<ul class="wp-block-list">
<li><strong>None</strong> — Clean list without numbers</li>



<li><strong>Decimal</strong> — Flat sequential counter (1, 2, 3)</li>



<li><strong>Nested</strong> — Hierarchical numbering (1.1, 1.2, 2.1)</li>
</ul>



<h3 id="3-collapsible-sticky-modes" class="wp-block-heading">3. Collapsible &amp; Sticky Modes</h3>



<p class="wp-block-paragraph">Save space by collapsing the TOC by default (readers can expand it with one click). Or enable sticky mode to keep the TOC visible as users scroll down long articles.</p>



<h3 id="4-active-heading-tracking" class="wp-block-heading">4. Active Heading Tracking</h3>



<p class="wp-block-paragraph">Using the IntersectionObserver API, the TOC automatically highlights which section the reader is currently viewing. This provides excellent orientation within long-form content.</p>



<h3 id="5-smooth-scrolling-with-offset" class="wp-block-heading">5. Smooth Scrolling with Offset</h3>



<p class="wp-block-paragraph">When a reader clicks a TOC link, the page scrolls smoothly to that section. You can set a custom offset (in pixels) to account for fixed headers or admin bars.</p>



<h3 id="6-fine-grained-control" class="wp-block-heading">6. Fine-Grained Control</h3>



<ul class="wp-block-list">
<li><strong>Exclude headings</strong> by text (comma-separated list)</li>



<li><strong>Skip the first N headings</strong> (great for skipping the post title)</li>



<li><strong>Toggle individual heading levels</strong> (H2, H3, H4) on/off</li>



<li><strong>Add a &#8220;Back to Top&#8221; link</strong> at the bottom of the TOC</li>
</ul>



<h2 id="block-editor-vs-shortcode" class="wp-block-heading">Block Editor vs. Shortcode</h2>



<figure class="wp-block-table"><table><thead><tr><th>Feature</th><th>Gutenberg Block</th><th><nav class="wp-block-mctoc-toc mctoc" data-scroll-offset="80" data-show-back-to-top="0">
			<div class="mctoc__header">
			<span class="mctoc__title">Table of Contents</span>
			<button class="mctoc__toggle" aria-expanded="true" type="button">
				Hide			</button>
		</div>
		<ul class="mctoc__list">
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#introduction">
						Introduction					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#quick-start-guide">
						Quick Start Guide					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#block-editor-3-steps">
						Block Editor (3 steps)					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#classic-editor-shortcode">
						Classic Editor / Shortcode					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#key-features">
						Key Features					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#1-smart-heading-detection">
						1. Smart Heading Detection					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#2-flexible-numbering-styles">
						2. Flexible Numbering Styles					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#3-collapsible-sticky-modes">
						3. Collapsible &amp; Sticky Modes					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#4-active-heading-tracking">
						4. Active Heading Tracking					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#5-smooth-scrolling-with-offset">
						5. Smooth Scrolling with Offset					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#6-fine-grained-control">
						6. Fine-Grained Control					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#block-editor-vs-shortcode">
						Block Editor vs. Shortcode					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#shortcode-examples">
						Shortcode Examples					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#theme-integration-customization">
						Theme Integration &amp; Customization					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#accessibility-first">
						Accessibility First					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#performance-privacy">
						Performance &amp; Privacy					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#performance">
						Performance					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#privacy-gdpr-compliant">
						Privacy (GDPR Compliant)					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#requirements">
						Requirements					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#frequently-asked-questions">
						Frequently Asked Questions					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#changelog-highlights">
						Changelog Highlights					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#version-1-0-1">
						Version 1.0.1					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#version-0-1-0-initial-release">
						Version 0.1.0 (Initial Release)					</a>
				</span>
			</li>
			</ul>
	</nav>
		 Shortcode</th></tr></thead><tbody><tr><td>Live preview in editor</td><td>✅ Yes</td><td>❌ No</td></tr><tr><td>Design controls (colors, spacing, borders)</td><td>✅ Yes (via block sidebar)</td><td>❌ Limited (via theme CSS)</td></tr><tr><td>Works in Classic Editor</td><td>❌ No</td><td>✅ Yes</td></tr><tr><td>Works in text widgets</td><td>❌ No</td><td>✅ Yes</td></tr><tr><td>Works in PHP templates</td><td>❌ No</td><td>✅ Yes (<code>do_shortcode()</code>)</td></tr><tr><td>All customization attributes</td><td>✅ Yes (via inspector)</td><td>✅ Yes (via shortcode attributes)</td></tr></tbody></table></figure>



<h2 id="shortcode-examples" class="wp-block-heading">Shortcode Examples</h2>



<p class="wp-block-paragraph">For Classic Editor users, the <code><nav class="wp-block-mctoc-toc mctoc" data-scroll-offset="80" data-show-back-to-top="0">
			<div class="mctoc__header">
			<span class="mctoc__title">Table of Contents</span>
			<button class="mctoc__toggle" aria-expanded="true" type="button">
				Hide			</button>
		</div>
		<ul class="mctoc__list">
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#introduction">
						Introduction					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#quick-start-guide">
						Quick Start Guide					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#block-editor-3-steps">
						Block Editor (3 steps)					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#classic-editor-shortcode">
						Classic Editor / Shortcode					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#key-features">
						Key Features					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#1-smart-heading-detection">
						1. Smart Heading Detection					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#2-flexible-numbering-styles">
						2. Flexible Numbering Styles					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#3-collapsible-sticky-modes">
						3. Collapsible &amp; Sticky Modes					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#4-active-heading-tracking">
						4. Active Heading Tracking					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#5-smooth-scrolling-with-offset">
						5. Smooth Scrolling with Offset					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#6-fine-grained-control">
						6. Fine-Grained Control					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#block-editor-vs-shortcode">
						Block Editor vs. Shortcode					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#shortcode-examples">
						Shortcode Examples					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#theme-integration-customization">
						Theme Integration &amp; Customization					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#accessibility-first">
						Accessibility First					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#performance-privacy">
						Performance &amp; Privacy					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#performance">
						Performance					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#privacy-gdpr-compliant">
						Privacy (GDPR Compliant)					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#requirements">
						Requirements					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#frequently-asked-questions">
						Frequently Asked Questions					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#changelog-highlights">
						Changelog Highlights					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#version-1-0-1">
						Version 1.0.1					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#version-0-1-0-initial-release">
						Version 0.1.0 (Initial Release)					</a>
				</span>
			</li>
			</ul>
	</nav>
		</code> shortcode accepts several attributes:</p>



<nav class="wp-block-mctoc-toc mctoc mctoc--collapsed" data-scroll-offset="80" data-show-back-to-top="0">
			<div class="mctoc__header">
			<span class="mctoc__title">On This Page</span>
			<button class="mctoc__toggle" aria-expanded="false" type="button">
				Show			</button>
		</div>
		<ul class="mctoc__list" hidden>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#introduction">
						1. Introduction					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#quick-start-guide">
						2. Quick Start Guide					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#block-editor-3-steps">
						2.1. Block Editor (3 steps)					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#classic-editor-shortcode">
						2.2. Classic Editor / Shortcode					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#key-features">
						3. Key Features					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#1-smart-heading-detection">
						3.1. 1. Smart Heading Detection					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#2-flexible-numbering-styles">
						3.2. 2. Flexible Numbering Styles					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#3-collapsible-sticky-modes">
						3.3. 3. Collapsible &amp; Sticky Modes					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#4-active-heading-tracking">
						3.4. 4. Active Heading Tracking					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#5-smooth-scrolling-with-offset">
						3.5. 5. Smooth Scrolling with Offset					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#6-fine-grained-control">
						3.6. 6. Fine-Grained Control					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#block-editor-vs-shortcode">
						4. Block Editor vs. Shortcode					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#shortcode-examples">
						5. Shortcode Examples					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#theme-integration-customization">
						6. Theme Integration &amp; Customization					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#accessibility-first">
						7. Accessibility First					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#performance-privacy">
						8. Performance &amp; Privacy					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#performance">
						8.1. Performance					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#privacy-gdpr-compliant">
						8.2. Privacy (GDPR Compliant)					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#requirements">
						9. Requirements					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#frequently-asked-questions">
						10. Frequently Asked Questions					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#changelog-highlights">
						11. Changelog Highlights					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#version-1-0-1">
						11.1. Version 1.0.1					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#version-0-1-0-initial-release">
						11.2. Version 0.1.0 (Initial Release)					</a>
				</span>
			</li>
			</ul>
	</nav>
		



<p class="wp-block-paragraph">All available attributes:</p>



<ul class="wp-block-list">
<li><code>title</code> — Custom heading text (default: &#8220;Table of Contents&#8221;)</li>



<li><code>include_h2</code> / <code>include_h3</code> / <code>include_h4</code> — true/false</li>



<li><code>exclude</code> — Comma-separated heading texts to exclude</li>



<li><code>numbering</code> — &#8220;none&#8221;, &#8220;decimal&#8221;, or &#8220;nested&#8221;</li>



<li><code>collapsed</code> — Start collapsed (true/false)</li>



<li><code>sticky</code> — Enable sticky positioning</li>



<li><code>offset</code> — Scroll offset in pixels</li>



<li><code>skip</code> — Skip first N headings</li>



<li><code>back_to_top</code> — Show Back to Top link</li>
</ul>



<h2 id="theme-integration-customization" class="wp-block-heading">Theme Integration &amp; Customization</h2>



<p class="wp-block-paragraph">The TOC inherits your theme&#8217;s design tokens automatically. It uses these CSS custom properties if they exist:</p>



<ul class="wp-block-list">
<li><code>--wp--preset--color--primary</code> — Link and active highlight color</li>



<li><code>--wp--preset--color--contrast</code> — Border and text color</li>



<li><code>--wp--preset--color--base</code> — Sticky mode background</li>



<li><code>--wp-admin--admin-bar--height</code> — Admin bar offset for sticky mode</li>
</ul>



<p class="wp-block-paragraph">When using the Gutenberg block, you can customize colors, typography, spacing, and borders directly from the block sidebar — no CSS required.</p>



<p class="wp-block-paragraph"><strong>Custom CSS example:</strong> Change the active link color:</p>



.mctoc__link&#8211;active a {
    color: #e74c3c;
}



<h2 id="accessibility-first" class="wp-block-heading">Accessibility First</h2>



<p class="wp-block-paragraph">Mocursor Smart TOC was built with accessibility at its core:</p>



<ul class="wp-block-list">
<li>Semantic HTML using <code>&lt;nav&gt;</code> and heading structures</li>



<li>Proper ARIA attributes (<code>aria-expanded</code>, etc.)</li>



<li>Full keyboard navigation support</li>



<li>Screen reader friendly (toggle button text changes contextually)</li>



<li><code>hidden</code> attribute used for collapsed content</li>



<li>Respects <code>prefers-reduced-motion</code> browser setting</li>
</ul>



<h2 id="performance-privacy" class="wp-block-heading">Performance &amp; Privacy</h2>



<h3 id="performance" class="wp-block-heading">Performance</h3>



<ul class="wp-block-list">
<li><strong>No frameworks</strong> — Pure vanilla JavaScript</li>



<li><strong>Zero external requests</strong> — Everything runs on your server</li>



<li><strong>Tiny footprint</strong> — Under 3KB CSS + under 3KB JS (minified)</li>



<li><strong>Smart active tracking</strong> — Uses IntersectionObserver, not scroll events</li>



<li><strong>Server-side rendering</strong> — TOC HTML generated in PHP, not client-side</li>
</ul>



<h3 id="privacy-gdpr-compliant" class="wp-block-heading">Privacy (GDPR Compliant)</h3>



<p class="wp-block-paragraph">Mocursor Smart TOC collects <strong>zero user data</strong>. No cookies. No local storage. No analytics. No third-party scripts. No external HTTP requests. It&#8217;s fully GDPR compliant out of the box — no privacy policy update needed.</p>



<h2 id="requirements" class="wp-block-heading">Requirements</h2>



<ul class="wp-block-list">
<li>WordPress 6.4 or higher</li>



<li>PHP 7.4 or higher</li>



<li>Any theme (block-enabled or classic)</li>
</ul>



<h2 id="frequently-asked-questions" class="wp-block-heading">Frequently Asked Questions</h2>


<details class="wp-block-details">
<summary>Does the TOC update automatically when I change headings?</summary>
<p>Yes. The block is dynamically rendered on the server every time the page loads.</p>
</details>
<details class="wp-block-details">
<summary>Which heading levels are supported?</summary>
<p>H2, H3, and H4. You can toggle each level on or off independently.</p>
</details>
<details class="wp-block-details">
<summary>Can I exclude specific headings?</summary>
<p>Yes. Provide a comma-separated list of heading texts in the &#8220;Exclude Headings&#8221; field.</p>
</details>
<details class="wp-block-details">
<summary>Does it work with page builders?</summary>
<p>The shortcode works anywhere shortcodes are processed. For Gutenberg-based builders, use the block directly.</p>
</details>
<details class="wp-block-details">
<summary>Can I have multiple TOCs on one page?</summary>
<p>Yes. Each TOC instance operates independently with its own settings.</p>
</details>


<h2 id="changelog-highlights" class="wp-block-heading">Changelog Highlights</h2>



<h3 id="version-1-0-1" class="wp-block-heading">Version 1.0.1</h3>



<ul class="wp-block-list">
<li>Added <code><nav class="wp-block-mctoc-toc mctoc" data-scroll-offset="80" data-show-back-to-top="0">
			<div class="mctoc__header">
			<span class="mctoc__title">Table of Contents</span>
			<button class="mctoc__toggle" aria-expanded="true" type="button">
				Hide			</button>
		</div>
		<ul class="mctoc__list">
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#introduction">
						Introduction					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#quick-start-guide">
						Quick Start Guide					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#block-editor-3-steps">
						Block Editor (3 steps)					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#classic-editor-shortcode">
						Classic Editor / Shortcode					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#key-features">
						Key Features					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#1-smart-heading-detection">
						1. Smart Heading Detection					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#2-flexible-numbering-styles">
						2. Flexible Numbering Styles					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#3-collapsible-sticky-modes">
						3. Collapsible &amp; Sticky Modes					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#4-active-heading-tracking">
						4. Active Heading Tracking					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#5-smooth-scrolling-with-offset">
						5. Smooth Scrolling with Offset					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#6-fine-grained-control">
						6. Fine-Grained Control					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#block-editor-vs-shortcode">
						Block Editor vs. Shortcode					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#shortcode-examples">
						Shortcode Examples					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#theme-integration-customization">
						Theme Integration &amp; Customization					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#accessibility-first">
						Accessibility First					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#performance-privacy">
						Performance &amp; Privacy					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#performance">
						Performance					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#privacy-gdpr-compliant">
						Privacy (GDPR Compliant)					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#requirements">
						Requirements					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#frequently-asked-questions">
						Frequently Asked Questions					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h2">
				<span class="mctoc__link">
					<a href="#changelog-highlights">
						Changelog Highlights					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#version-1-0-1">
						Version 1.0.1					</a>
				</span>
			</li>
					<li class="mctoc__item mctoc__item--h3">
				<span class="mctoc__link">
					<a href="#version-0-1-0-initial-release">
						Version 0.1.0 (Initial Release)					</a>
				</span>
			</li>
			</ul>
	</nav>
		</code> shortcode support with full attribute control</li>



<li>Enqueue frontend assets on shortcode usage for classic editor compatibility</li>
</ul>



<h3 id="version-0-1-0-initial-release" class="wp-block-heading">Version 0.1.0 (Initial Release)</h3>



<ul class="wp-block-list">
<li>Table of Contents Gutenberg block</li>



<li>Automatic heading detection (H2-H4)</li>



<li>Three numbering styles: None, Decimal, Nested</li>



<li>Collapsible TOC with configurable default state</li>



<li>Smooth scrolling with configurable offset</li>



<li>Active heading highlight via IntersectionObserver</li>



<li>Back to Top and Sticky mode</li>



<li>Full block editor design controls</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="has-text-align-center wp-block-paragraph"><strong>Mocursor Smart TOC</strong> is free, open-source software released under the GPLv2 license.<br>Development supported by <a href="https://telex.im" rel="nofollow noopener" target="_blank">Telex AI</a> by Automattic.</p>



<p class="has-text-align-center wp-block-paragraph"><a href="https://mosescursor.com/moses-cursor-smart-toc/">Plugin Homepage</a> | <a href="https://mosescursor.com">Developer Site</a> | <strong>#mocursor #smarttoc #wordpress</strong></p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
