Search code examples
etherpad

Etherpad-lite list numering formatting


Is it possible to set numbered list format in etherpad-lite?

Default format is:

1. 
1.1.
1.1.1 

I would like to have formatting:

§1
1)
1.

UPDATE: Tried to use

.list-number1 li:before {
    content: "§" counter(first, decimal);
    counter-increment: first;
}

but all elements at first level have §1 numbering (I think there is no pure css solution for that) enter image description here


Solution

  • I wrote the Etherpad Ordered List implementation. it would be easy to do what you want with CSS.

    Place the followin in your src/static/custom/pad.css

    /* The behavior for incrementing and the prefix */
    .list-number1 li:before {
      content: "§" counter(first);
      counter-increment: first;
    }
    
    .list-number2 li:before {
      content: counter(first) ")";
      counter-increment: second;
    }
    
    .list-number3 li:before {
      content: counter(first) ".";
      counter-increment: third 1;
    }
    

    Ensure when you refresh your page that it hasn't loaded the minified/cached version of custom/pad.css

    I find it bizarre that this got down-voted.. OP can you please confirm this is the correct answer?

    Again it's worth noting I wrote the implementation in Etherpad Core so I'm kinda familiar with this...