cogProvides the User Interface and CKEditor plugins for Numbered Headings.
Recommended
TypeXAR
CategoryApplication
Developed by

Manuel Leduc, Michael Hamann

Active Installs65
Rating
2 Votes
LicenseGNU Lesser General Public License 2.1
Compatibility

14.2+

Installable with the Extension Manager

Description

Provides the User Interface and CKEditor plugins for Numbered Headings. This application is part of the Numbered Content feature.

Numbering Activation

From the UI

Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [xwiki:Macros.VersionMacro]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

From the Object Editor

To activate headings numbering on a Space or a Page, a NumberedHeadings.Code.NumberedHeadingsClass XObject can be added, and its status field set to Activated.
To deactivate headings numbering, the same steps can be followed, but the status field must be set to Deactivated.

Use Example

In the sample below, the first two header are numbered incrementally, according to their level.
Then, the third header numbering is skipped, using the data-xwiki-rendering-protected parameter (note that the data-numbered-headings-skip parameter was used instead in versions 1.0 and 1.1). Hence, the fourth header is numbered 1.1.1.
Finally, the last header is re-numbered to 10, and it full numbered is 1.10.

= Header 1 =

== Header 1.1 ==

(% data-xwiki-rendering-protected="true" %)
=== Header without number ===

=== Header 1.1.1 ===

(% data-numbered-headings-start="10" style="--numbered-headings-start: 9;" %)
== Header 1.10 ==

Template

A template named Numbered Headings Template is provided. It creates a document with numbered headings activated and a single header with a placeholder content.

CKEditor Integration

Heading Level change on Tab

When the cursor is placed on a header in the editor, pressing tab increases the header level by 1 (pressing tab on a level 6 header has no effect).
Pressing shift+tab decreases the header level by 1. Pressing shift+tab on a level 1 header replaces it by a normal text field.

Numbering deactivation

Numbers can be deactivated on a header by right-clicking on it and click one the Skip Numbering: Activate entry.
In the same way, re-activating the numbering on a header can be done by selecting the Skip Numbering: Deactivate entry.

Re-Numbering

A specific value can be forced on a header by right-clicking on a header and click on the Header Config entry. Then, a modal windows is proposed with a start field where a integer value can be defined. The entered value impact the last segment of the header. For instance, setting 10 on a level 3 header 12.5.2 will make it 12.5.10.
Leaving the field empty reset the field to the standard incremental numbering behavior.

Table of Content

See ToC Macro.

Known Limitations

Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [xwiki:Macros.VersionMacro]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

Numbering and groups

Using re-numbering on headers located inside groups (for instance, a div tag) does not impacts the following headers located outside of the group. In this case, inconsistent numbers can be presented and the re-numbering feature must be used manually on the first header after the group to fix the inconsistency.

Release Notes

1.3

1.2

Breaking change The parameter used to skip numbering (data-numbered-headings-skip) is now replaced by data-xwiki-rendering-protected.

1.1

1.0

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

Dependencies

Dependencies for this extension (org.xwiki.contrib.numbered.content:application-numbered-content-headings-ui 1.3):

Tags:
    

Get Connected