Download the PHP package fxcjahid/laravel-table-of-content without Composer
On this page you can find all versions of the php package fxcjahid/laravel-table-of-content. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download fxcjahid/laravel-table-of-content
More information about fxcjahid/laravel-table-of-content
Files in fxcjahid/laravel-table-of-content
Download fxcjahid/laravel-table-of-content
More information about fxcjahid/laravel-table-of-content
Files in fxcjahid/laravel-table-of-content
Vendor fxcjahid
Package laravel-table-of-content
Short Description Laravel Table Of Content Generator
License MIT
Package laravel-table-of-content
Short Description Laravel Table Of Content Generator
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-table-of-content
Laravel Table of Content Generator
Generates a Table of Contents from H1...H6 Tags in HTML Content
This package provides a simple library to build a Table-of-Contents from HTML markup. It does so by evaluating your H1...H6 tags. It can also automatically add appropriate id anchor attributes to header tags so that in-page links work.
Features:
- Generates HTML menus and KnpMenu Item Menus
- Add anchor ID attributes to H1...H6 tags in your content where they haven't attributes
- You can specify tag which H1...H6 heading tag levels to include in the TOC
- Uses the flexible KnpMenu Library to generate menus
- PSR-12 compliant
- Composer-compatible
- Unit-tested (95% coverage)
Installation Options
Install with composer :
composer require fxcjahid/laravel-table-of-content
Usage
This package contains two main classes:
fxcjahid\LaravelTableOfContent\MarkupFixer
: Addsid
anchor attributes to any H1...H6 tags that do not already have any (you can specify which header tag levels to use at runtime)fxcjahid\LaravelTableOfContent\Table
: Generates a Table of Contents from HTML markup
Basic Example:
This produces the following output:
Integration in controller
- This package inspired by https://github.com/caseyamcl/toc
All versions of laravel-table-of-content with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.0||^8.0
masterminds/html5 Version ^2.1
knplabs/knp-menu Version ^2.0
cocur/slugify Version ^2.0
masterminds/html5 Version ^2.1
knplabs/knp-menu Version ^2.0
cocur/slugify Version ^2.0
The package fxcjahid/laravel-table-of-content contains the following files
Loading the files please wait ....