這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

TinyMCE Table of Contents

描述

How much time have you spent every time you have created a table of contents manually? Or you may even haven’t do it because of the pain that it would suppose to do it manually?

With this plugin, you will be able to generate tables of contents for your posts in a completely easy, automated and personalizable way. It automatically looks for every <h*> tag, to generate the table entries for them.

Features:

  • Configuration of the depth level of the table.
  • Configuration of the indentation of the levels of the table.
  • Option to add to the elements of the table link to each section.

螢幕截圖

  • TinyMCE Table of Contents in the editor
  • Options for creating table of contents
  • Generated table of contents

安裝

If you have ever installed a WordPress plugin, then installation will be pretty easy:

  1. Download the TinyMCE Table of Contents plugin and extract the files.
  2. You should have now a directory named ‘tinymce-table-of-contents’ with some files in its root. Copy this directory into ‘/path/to/wordpress/wp-contents/plugins’.
  3. Enable the plugin from WordPress (Plugins > Installed Plugins >Activate option, for TinyMCE Table of Contents).
  4. A new element should now appear in TinyMCE editor. Just click it and select the options you want for your table of contents.

常見問題

How are links added? If my titles already have an id attribute, will they be overwritten?

The links are added by adding an id attribute to each title appearing in the table of contents, but only if it doesn’t have it; original id attributes are not overwritten, not to break any other possible reference.

The format of the generated id is “section_x”, “section_x_y”, etc. Then, the link is just a hyperlink to the “id” (e.g., “< a href=’#section_x’>Section X”).

How is the indentation added?

The indentation of each level of the table is just a set of &nbsp;, styled with white-space: pre;, to make the browser preserve them.

How do I notify about a bug/feature request?

Open an issue in the bug tracker, giving as much as information possible:

  • For bugs: steps to reproduce; WordPress version.
  • For features: a detailed description of what is wanted to achieve.

評價

There are no reviews for this plugin.

貢獻者及開發者

“TinyMCE Table of Contents” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 TinyMCE Table of Contents 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

1.0

First release.