Version 2.0
What it does
This plugin adds the table of content panel to Xeditor. It will displayed configured chapter like elements in a tree structure. It will also add proper numbering to the defined title element. Additioanly, the entries can be rearranged using its drag&drop feature. Since the Plugin also exports the panel, so it can be added to any component that can contain a panel.
Installation
First you have to switch into your project location using the command line.
cd path/to/your/project
Now you should be in the same directory as the package.json
file. Then you can install the plugin as follows:
npm install @xeditor/plugin-toc --save --registry https://npm.xeditor.com:4873
configuration
The demo configuration of the plugin looks like this:
{
pluginId: 'toc',
ptype: 'uxxeditortoc',
tocTypes: {
chapter: {
iconCls: 'fa-file-text-o',
hasNumber: true,
textType: 'heading',
searchRecursive: false
}
}
}
This results into the following:
- chapter
elements will add entries to the table of content panel
- the content of the heading
element will be used as text content of created entry
- chapter
elements can be rearranged using drag&drop on created entries
API
The API for the plugin can be found here: toc plugin API
Changelog
v2.0.1
Bugfixes
- Corrected include order of class files in index
2.0.0
Changes
- Adapted usages of updated method
getPlainText
as no more spaces are added automatically and therefore the result has changed - Plugin can now build TOC panel separately, meaning it can be used without adding it to the editor accordion
Bugfixes
- Added Bugfix to not get errors in overflow menu if button contains custom attributes