Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

输入[`{"']自动包裹对应字符 #1418

Merged
merged 8 commits into from
Jun 20, 2023
Merged

Conversation

790891601
Copy link
Contributor

@790891601 790891601 commented Jun 7, 2023

输入[`{"']自动包裹对应字符
还有对应一些想法:

  1. 如果没包裹文本为空是否需要补充对应字符,比如"...", '...', ..., {...}等,我觉得```是代码,就不用补充,其他的呢?
  2. 我看了MDN的beforeinput事件,因为是实验性代码,所以没使用;但是我觉得mouseup和selectstart事件,缺乏只用键盘选中对应字符串。
  3. 原来mouseup和selectstart事件是有一个问题,如果鼠标选中,松开的时候不在编辑器范围内,就会无法触发mouseup事件,所以我对应补充了document.mouseup事件。而且这些事件是可以被用户所覆盖,感觉使用一个事件库或者设计一个事件库比较好一些。

还有就是我对有一些代码和兼容不太熟,具体可能在某些情况下会有bug,希望能提醒一下。

20230607_141324.mp4

fix: #1417

@Vanessa219 Vanessa219 merged commit 9f84027 into Vanessa219:dev Jun 20, 2023
Vanessa219 added a commit that referenced this pull request Jun 20, 2023
@Vanessa219
Copy link
Owner

目前有2个问题,一个是粗体丢失,一个是换行丢失。由于要发版,我先回滚了。这个可能需要再考虑考虑,也许没那么多人有这个需求。

QQ20230620-215924-HD.mp4

Vanessa219 added a commit that referenced this pull request Jun 20, 2023
@790891601
Copy link
Contributor Author

目前有2个问题,一个是粗体丢失,一个是换行丢失。由于要发版,我先回滚了。这个可能需要再考虑考虑,也许没那么多人有这个需求。

Okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants