Skip to content

Comments

Improve inserting a new item at the end of a list via Alt+Enter#16314

Open
TCOTC wants to merge 4 commits intosiyuan-note:devfrom
TCOTC:fix/list
Open

Improve inserting a new item at the end of a list via Alt+Enter#16314
TCOTC wants to merge 4 commits intosiyuan-note:devfrom
TCOTC:fix/list

Conversation

@TCOTC
Copy link
Contributor

@TCOTC TCOTC commented Nov 9, 2025

  • Alt+Enter 之后,如果当前列表项块中没有子列表块,则在最后一个子块的后面新建列表块 https://ld246.com/article/1762643983269
  • 把通过 .lastElementChild.previousElementSibling 获取最后一个子块的方式修改为通过新增的 getLastChildBlock 函数获取,也许能解决使用一些主题或插件时编辑列表会导致状态异常的情况(主题或插件会在编辑器中插入自定义的元素,导致 .lastElementChild.previousElementSibling 获取到的不是最后一个子块)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants