{"id":308348,"date":"2026-05-18T19:47:51","date_gmt":"2026-05-18T19:47:51","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/table-of-contents-by-mocursor\/"},"modified":"2026-05-18T19:47:29","modified_gmt":"2026-05-18T19:47:29","slug":"mocursor-toc","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/mocursor-toc\/","author":17804380,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.2","stable_tag":"1.0.2","tested":"7.0","requires":"6.4","requires_php":"7.4","requires_plugins":null,"header_name":"Mocursor Smart TOC","header_author":"mosescursor","header_description":"Automatically generates a linked, navigable table of contents from your post headings with smooth scrolling, numbering styles, collapsible display, and shortcode support.","assets_banners_color":"f0f3f8","last_updated":"2026-05-18 19:47:29","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/buymeacoffee.com\/mocursor","header_plugin_uri":"https:\/\/mosescursor.com\/moses-cursor-smart-toc\/","header_author_uri":"https:\/\/mosescursor.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":35,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","faq","changelog"],"tags":{"1.0.1":{"tag":"1.0.1","author":"mosescursor","date":"2026-05-18 19:54:09"},"1.0.2":{"tag":"1.0.2","author":"mosescursor","date":"2026-05-18 19:47:29"}},"upgrade_notice":{"1.0.1":"<p>Adds shortcode support for the classic editor and widgets. Safe upgrade from 0.1.0.<\/p>","0.1.0":"<p>Initial release of Mocursor Smart TOC.<\/p>"},"ratings":[],"assets_icons":{"icon.svg":{"filename":"icon.svg","revision":3536255,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":3536255,"resolution":"772x250","location":"assets","locale":"","width":2316,"height":750}},"assets_blueprints":{},"all_blocks":{"mctoc\/toc":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"mctoc\/toc","version":"1.0.1","title":"Mocursor Smart TOC","category":"mctoc-blocks","icon":"list-view","description":"Automatically generates a linked table of contents from your post headings with smooth scrolling, numbering styles, and collapsible display.","example":{},"attributes":{"title":{"type":"string","default":"Table of Contents"},"includeH2":{"type":"boolean","default":true},"includeH3":{"type":"boolean","default":true},"includeH4":{"type":"boolean","default":true},"excludeHeadings":{"type":"string","default":""},"numberingStyle":{"type":"string","default":"none"},"showBackToTop":{"type":"boolean","default":false},"collapsedByDefault":{"type":"boolean","default":false},"isSticky":{"type":"boolean","default":false},"skipHeadings":{"type":"integer","default":0},"scrollOffset":{"type":"integer","default":80}},"supports":{"html":false,"color":{"background":true,"text":true,"link":true},"typography":{"fontSize":true,"lineHeight":true},"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true}},"textdomain":"mocursortoc","editorScript":"file:.\/index.js","editorStyle":"file:.\/index.css","style":"file:.\/style-index.css","viewScript":"file:.\/view.js","render":"file:.\/render.php"}},"tagged_versions":["1.0.1","1.0.2"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"The Mocursor Smart TOC block in the editor showing a live heading preview and inspector controls.","2":"Frontend rendering with nested numbering, smooth scroll navigation, and active heading highlighting."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[],"plugin_category":[43],"plugin_contributors":[231753],"plugin_business_model":[],"class_list":["post-308348","plugin","type-plugin","status-publish","hentry","plugin_category-customization","plugin_contributors-mosescursor","plugin_committers-mosescursor"],"banners":{"banner":"https:\/\/ps.w.org\/mocursor-toc\/assets\/banner-772x250.jpg?rev=3536255","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/mocursor-toc\/assets\/icon.svg?rev=3536255","icon":"https:\/\/ps.w.org\/mocursor-toc\/assets\/icon.svg?rev=3536255","icon_2x":false,"generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p><strong>Mocursor Smart TOC<\/strong> is a lightweight, feature-packed Gutenberg block that automatically generates a linked table of contents from the headings in your posts and pages. Simply drop it into your content \u2014 it just works. Also available as a <code>[mctoc]<\/code> shortcode for classic editor users.<\/p>\n\n<p>The block is <strong>fully dynamic<\/strong>, <strong>accessible<\/strong>, <strong>lightweight<\/strong>, and <strong>theme-aware<\/strong>. It uses WordPress design tokens and CSS custom properties so it inherits your theme's colors, fonts, and spacing automatically.<\/p>\n\n<h4>Shortcode Support<\/h4>\n\n<p>The Mocursor Smart TOC block is also available as a <code>[mctoc]<\/code> shortcode for use in the classic editor, widgets, or theme templates.<\/p>\n\n<p><strong>Basic usage:<\/strong><\/p>\n\n<pre><code>[mctoc]\n<\/code><\/pre>\n\n<p><strong>With options:<\/strong><\/p>\n\n<pre><code>[mctoc title=\"On This Page\" include_h2=\"true\" include_h3=\"true\" include_h4=\"false\" numbering=\"nested\" collapsed=\"true\" sticky=\"true\" offset=\"100\" skip=\"1\" exclude_headings=\"Related Posts,Comments\" back_to_top=\"true\"]\n<\/code><\/pre>\n\n<p><strong>Available shortcode attributes:<\/strong><\/p>\n\n<ul>\n<li><code>title<\/code> \u2014 TOC heading text (default: \"Table of Contents\")<\/li>\n<li><code>include_h2<\/code> \u2014 Include H2 headings: \"true\" or \"false\" (default: \"true\")<\/li>\n<li><code>include_h3<\/code> \u2014 Include H3 headings: \"true\" or \"false\" (default: \"true\")<\/li>\n<li><code>include_h4<\/code> \u2014 Include H4 headings: \"true\" or \"false\" (default: \"true\")<\/li>\n<li><code>exclude_headings<\/code> \u2014 Comma-separated heading texts to exclude<\/li>\n<li><code>numbering<\/code> \u2014 Numbering style: \"none\", \"decimal\", or \"nested\" (default: \"none\")<\/li>\n<li><code>collapsed<\/code> \u2014 Start collapsed: \"true\" or \"false\" (default: \"false\")<\/li>\n<li><code>sticky<\/code> \u2014 Enable sticky mode: \"true\" or \"false\" (default: \"false\")<\/li>\n<li><code>offset<\/code> \u2014 Scroll offset in pixels for fixed headers (default: 80)<\/li>\n<li><code>skip<\/code> \u2014 Number of headings to skip from the start (default: 0)<\/li>\n<li><code>back_to_top<\/code> \u2014 Show \"Back to Top\" link: \"true\" or \"false\" (default: \"false\")<\/li>\n<\/ul>\n\n<h4>Ideal Use Cases<\/h4>\n\n<p>Mocursor Smart TOC is perfect for:<\/p>\n\n<ul>\n<li><strong>Long-form blog posts<\/strong> \u2014 Help readers navigate 2,000+ word articles with ease.<\/li>\n<li><strong>Documentation and knowledge bases<\/strong> \u2014 Technical docs, how-to guides, and reference pages.<\/li>\n<li><strong>Online courses and tutorials<\/strong> \u2014 Give learners a clear roadmap of every lesson section.<\/li>\n<li><strong>Legal, policy, and compliance pages<\/strong> \u2014 Terms of service, privacy policies, and similar documents.<\/li>\n<li><strong>Product and feature pages<\/strong> \u2014 Long product descriptions with multiple sections.<\/li>\n<li><strong>Recipe and travel blogs<\/strong> \u2014 Readers can jump to the section they care about.<\/li>\n<li><strong>Wiki-style internal sites<\/strong> \u2014 Any WordPress site used as an internal wiki or resource library.<\/li>\n<li><strong>Accessibility-focused sites<\/strong> \u2014 The TOC gives keyboard and screen reader users a reliable way to navigate.<\/li>\n<li><strong>Classic editor users<\/strong> \u2014 The shortcode works perfectly in the classic editor.<\/li>\n<\/ul>\n\n<h4>Why Choose Mocursor Smart TOC?<\/h4>\n\n<ol>\n<li><strong>Zero configuration needed<\/strong> \u2014 Drop the block in and it works immediately.<\/li>\n<li><strong>100% Gutenberg-native + Shortcode<\/strong> \u2014 Built as a real Gutenberg block with a classic shortcode fallback.<\/li>\n<li><strong>Dynamic and always up to date<\/strong> \u2014 Server-rendered, always matches the current content.<\/li>\n<li><strong>Incredibly lightweight<\/strong> \u2014 No JavaScript frameworks. Pure vanilla JS for all interactivity.<\/li>\n<li><strong>Deeply customizable<\/strong> \u2014 Rich inspector controls for heading levels, numbering, collapsibility, sticky mode, and more.<\/li>\n<li><strong>Accessible by default<\/strong> \u2014 Proper ARIA attributes, keyboard navigation, semantic HTML, and focus management.<\/li>\n<li><strong>Theme-aware<\/strong> \u2014 Uses WordPress design tokens and CSS custom properties.<\/li>\n<li><strong>No lock-in<\/strong> \u2014 Deactivate the plugin and your content is untouched.<\/li>\n<li><strong>Privacy-friendly<\/strong> \u2014 No external requests, no tracking, no analytics, no cookies.<\/li>\n<li><strong>Open source<\/strong> \u2014 Licensed under GPLv2.<\/li>\n<\/ol>\n\n<h4>Block Features<\/h4>\n\n<ul>\n<li>Automatic heading detection for H2, H3, and H4<\/li>\n<li>Heading level filtering with individual checkboxes<\/li>\n<li>Exclude specific headings by text<\/li>\n<li>Skip first N headings option<\/li>\n<li>Three numbering styles: None, Decimal, Nested<\/li>\n<li>Collapsible TOC with configurable default state<\/li>\n<li>Smooth scrolling with configurable offset<\/li>\n<li>Active heading highlight via IntersectionObserver<\/li>\n<li>Back to Top link<\/li>\n<li>Sticky mode<\/li>\n<li>Live editor preview<\/li>\n<li>Full block editor design controls (colors, typography, spacing, borders)<\/li>\n<li>Shortcode support with full attribute control<\/li>\n<\/ul>\n\n<h4>How to Use<\/h4>\n\n<p><strong>Method 1: Block Editor<\/strong><\/p>\n\n<ol>\n<li>Install and activate the plugin.<\/li>\n<li>Open any post or page in the block editor.<\/li>\n<li>Click the block inserter (+), search for \"Mocursor Smart TOC\", and insert the block.<\/li>\n<li>Customize via the block settings sidebar.<\/li>\n<li>Publish \u2014 the TOC renders with smooth scrolling and active heading tracking.<\/li>\n<\/ol>\n\n<p><strong>Method 2: Shortcode<\/strong><\/p>\n\n<ol>\n<li>In any post, page, or widget, type <code>[mctoc]<\/code>.<\/li>\n<li>Optionally add attributes: <code>[mctoc title=\"Contents\" numbering=\"decimal\" collapsed=\"true\"]<\/code>.<\/li>\n<\/ol>\n\n<p><strong>Method 3: PHP Template<\/strong><\/p>\n\n<pre><code>&lt;?php echo do_shortcode( '[mctoc title=\"Page Contents\" numbering=\"nested\"]' ); ?&gt;\n<\/code><\/pre>\n\n<p><strong>Tips:<\/strong><\/p>\n\n<ul>\n<li>Place the TOC inside a Group block with a max-width for a contained look.<\/li>\n<li>Enable sticky mode for sidebar layouts.<\/li>\n<li>Use the shortcode in classic editor widgets or template files.<\/li>\n<\/ul>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20the%20toc%20update%20automatically%20when%20i%20change%20headings%3F\"><h3>Does the TOC update automatically when I change headings?<\/h3><\/dt>\n<dd><p>Yes. The block is dynamically rendered on the server every time the page loads.<\/p><\/dd>\n<dt id=\"which%20heading%20levels%20are%20supported%3F\"><h3>Which heading levels are supported?<\/h3><\/dt>\n<dd><p>The TOC block supports H2, H3, and H4. Toggle each level on or off independently.<\/p><\/dd>\n<dt id=\"can%20i%20exclude%20specific%20headings%20from%20the%20toc%3F\"><h3>Can I exclude specific headings from the TOC?<\/h3><\/dt>\n<dd><p>Yes. In the block settings or via the shortcode <code>exclude<\/code> attribute, provide a comma-separated list of heading texts to omit.<\/p><\/dd>\n<dt id=\"what%20happens%20if%20there%20are%20no%20headings%3F\"><h3>What happens if there are no headings?<\/h3><\/dt>\n<dd><p>The TOC block doesn't render anything. No empty box, no broken layout.<\/p><\/dd>\n<dt id=\"can%20i%20use%20the%20shortcode%20in%20the%20classic%20editor%3F\"><h3>Can I use the shortcode in the classic editor?<\/h3><\/dt>\n<dd><p>Yes. The <code>[mctoc]<\/code> shortcode works in the classic editor, widgets, and theme templates.<\/p><\/dd>\n<dt id=\"does%20the%20plugin%20make%20any%20external%20requests%3F\"><h3>Does the plugin make any external requests?<\/h3><\/dt>\n<dd><p>No. Everything runs entirely on your server. Fully GDPR and privacy compliant.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Added <code>[mctoc]<\/code> shortcode support with full attribute control.<\/li>\n<li>Enqueue frontend assets (CSS and JS) on shortcode usage for classic editor compatibility.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<p>submitted to the plugins review team and added Documentation and plugin uri<\/p>\n\n<h4>0.1.0<\/h4>\n\n<ul>\n<li>Initial release with Table of Contents block.<\/li>\n<\/ul>","raw_excerpt":"A powerful, lightweight Gutenberg block that automatically generates a linked, navigable table of contents from your post headings.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/308348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=308348"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mosescursor"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=308348"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=308348"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=308348"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=308348"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=308348"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=308348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}