【问题标题】:Etherpad-lite list numering formattingEtherpad-lite 列表编号格式
【发布时间】:2014-03-18 11:17:16
【问题描述】:

是否可以在 etherpad-lite 中设置编号列表格式?

默认格式为:

1. 
1.1.
1.1.1 

我想要格式化:

§1
1)
1.

更新:尝试使用

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

但第一级的所有元素都有 §1 编号(我认为没有纯 css 解决方案)

【问题讨论】:

    标签: etherpad


    【解决方案1】:

    我编写了 Etherpad 有序列表实现。用 CSS 做你想做的事会很容易。

    将以下内容放在您的 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;
    }
    

    确保刷新页面时它没有加载 custom/pad.css 的缩小/缓存版本

    我觉得这被否决了很奇怪.. OP 你能确认这是正确的答案吗?

    再次值得注意的是,我在 Etherpad Core 中编写了实现,所以我对此有点熟悉...

    【讨论】:

      猜你喜欢
      • 2018-02-03
      • 2021-01-03
      • 2012-08-13
      • 2021-06-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多