About Automatically add anchors and IDs to Headings
Adds an id attribute to every heading with a slug of the text. Intended for easily creating linkable sections
Textformatter modules that provide run-time formatting for blocks of text (typically used with Text/Textarea fields).
Should be safe for use in production environments. *
|Compatibility||2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0|
|Date Added||November 13, 2015|
This module's files should be placed in /site/modules/TextformatterAutoAnchor/
How to install or uninstall modules
ProcessWire Module: Automatically add anchors and IDs to Headings
This Textformatter adds an id attribute to every heading with a slug of the text. Intended for easily creating linkable sections.
Determine which headings you want to have the ID + anchorUse a regex-like range or list, e.g.:
Your css classes that are attached to the anchor link.
The text for your anchor. If you prefer an icon, you could also use HTML for example.
There are existing tools like Anchorific JS but its dependency is jQuery. I love to have an alternative that is PHP only.
- Anchors are placed in front of the text. This could be a future configurable setting.
- The slug is also not configurable yet, currently it is lowercased and space is replaced with hyphens/dashes
No comments yet. Be the first to post!
Your e-mail is kept confidential and not included with your comment. Website is optional.
- Admin Helpers
- Core Modules
- Development Tools
- Field Types
- File Validator
- Input Fields
- Language Modules
- Language Packs
- Markup Generation
- Premium Modules
- Process Modules
- Proof of Concept
- Site Profiles
- Social, Feeds, Services
- Text Formatters
- Other Modules
- Users and Access
*Use modules at your own risk. There are no guarantees or warranties. It is recommended that you backup your site and database before installing new modules.