收藏
回答

公众号编辑器解析html代码时列表顺序问题?

html代码如下

<section id="nice" data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px; color: black; padding: 0 10px; line-height: 1.6; word-spacing: 0px; letter-spacing: 0px; word-break: break-word; word-wrap: break-word; text-align: left; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;"><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">今天</p>
<ul data-tool="mdnice编辑器" style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: disc;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">明天
<ul style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: square;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">后天
<ul style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: square;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">大后天
<ul style="margin-top: 8px; margin-bottom: 8px; padding-left: 25px; color: black; list-style-type: square;">
<li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">大大后天</section></li></ul>
</section></li></ul>
</section></li></ul>
</section></li></ul>
</section>


复制到编辑器后,争取的解析结果应该为:


但实际的解析结果为:

萌新求救!

回答关注问题邀请回答
收藏

1 个回答

  • 公众号技术运营专员-livia
    公众号技术运营专员-livia
    2022-05-31

    你好,你上面的编辑是在其他的工具上编辑的吗?编辑器会自动调整相关的排版。

    2022-05-31
    有用
    回复 1
    • GengRX
      GengRX
      2022-05-31
      您好,是的,确实是这样hhhhh 
      我是用markdown编辑的,然后在mdnice (https://editor.mdnice.com/) 上转成公众号编辑器的格式。我发现公众号编辑器会自动完成下述转换,从而造成层级混乱
      2022-05-31
      回复
登录 后发表内容
问题标签