@contentarchitect/toc

0.0.3 • Public • Published

Toc

Toc is a block for Table of Contents for ContentArchitect editor. Toc creates a table of contents based on the titles in the editor body. It does this automatically. It takes into account hierarchy.

Installation

1st method

If you are using node you can install it:

npm i -S @contentarchitect/toc or yarn add @contentarchitect/toc after this:

import Toc from '@contentarchitect/toc'

ContentArchitect.Blocks.register(Toc)

2nd method

In your web page:

<script src="https://unpkg.com/@contentarchitect/toc"></script>
<script>
	ContentArchitect.Blocks.register(Toc)
</script>

Properties

  • No need JS for on the viewing side (Editor side rendering)
  • Automatic detection of headers changes
  • Style customization with class options

Package Sidebar

Install

npm i @contentarchitect/toc

Weekly Downloads

2

Version

0.0.3

License

ISC

Unpacked Size

19.9 kB

Total Files

12

Last publish

Collaborators

  • cihad