Details
-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
-
Unknown
-
https://extensions.xwiki.org/xwiki/bin/view/Extension/Numbered Headings Application/
-
N/A
-
Description
Numbering using CSS in edit mode is easy until you need to restart numbering from an arbitrary value.
Using css, several solutions can be considered:
- take into account a start attribute on the hX tags. This requires to generate a specific rule for each possible value of the start attribute (all integers is a lot), so a lot of css (which can be generated using less) but even with less, resetting to value above 100 is difficult.
- introduce a "style="--start-value=''XXX"" attribute on hX. This works fine but makes the serialization less readable (which is fine as long as one does not switch to xwiki edit mode). This solution is 100% css and quite straightforward
- introduce a listener monitoring heading create/update and generates dedicate CSS rules on the fly