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
Open
Improve inserting a new item at the end of a list via Alt+Enter#16314TCOTC wants to merge 4 commits intosiyuan-note:devfrom
Alt+Enter#16314TCOTC wants to merge 4 commits intosiyuan-note:devfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Alt+Enter之后,如果当前列表项块中没有子列表块,则在最后一个子块的后面新建列表块 https://ld246.com/article/1762643983269.lastElementChild.previousElementSibling获取最后一个子块的方式修改为通过新增的 getLastChildBlock 函数获取,也许能解决使用一些主题或插件时编辑列表会导致状态异常的情况(主题或插件会在编辑器中插入自定义的元素,导致.lastElementChild.previousElementSibling获取到的不是最后一个子块)