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

feat: 对正在编辑的区域进行高亮 #413

Merged
merged 6 commits into from
Mar 15, 2023
Merged

Conversation

yxKryptonite
Copy link
Contributor

如题,是对 issue#411 的一次尝试。

如下图,在鼠标点击左侧编辑区时,右侧预览区对应位置会高亮显示 (具体的高亮样式可以进一步编辑,此处只是加了一个 background-color):

截屏2023-03-14 20 24 27

同时,如果使用方向键对光标进行移动,高亮区域也会随着光标的位置而改变。在编辑时,高亮也会持续显示不会消失。

欢迎 review 和测试代码。

src/Previewer.js Outdated Show resolved Hide resolved
@yxKryptonite yxKryptonite requested a review from sunsonliu March 15, 2023 07:11
@sunsonliu sunsonliu merged commit bac8173 into Tencent:dev Mar 15, 2023
Copy link
Collaborator

@sunsonliu sunsonliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~~

wty92911 pushed a commit to wty92911/cherry-markdown that referenced this pull request May 22, 2023
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.

2 participants