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

优化按钮插入标题和水平线的形式。 #104

Closed
wants to merge 1 commit into from

Conversation

shaginblog
Copy link

No description provided.

@pandao
Copy link
Owner

pandao commented Jun 5, 2015

@shaginblog 没有考虑到选取文本替换的场景。

@shaginblog
Copy link
Author

@pandao 标题和水平线跟加粗之类的不同,我觉得不用考虑选取文本的情况。因为即便是选取了也一样的效果。如果一行内文本用户没有选取整个一行的情况下选取文本前面插入到# 号达不到弄标题的效果。所以在这应该只考虑cursor位置,行的最前面加# 之后cursor回到原来的位置就行。

@shaginblog
Copy link
Author

还有插入图片,blockquote, 代码块之类的都应该考虑这种形式的插入。插入图片用户习惯性不会插入到文本中间。blockquote,代码块 也是。这样插入使用户不在换行的情况下 不会多操作一个步骤,对用户友好点。

@pandao
Copy link
Owner

pandao commented Jun 8, 2015

@shaginblog 接受你的部分提议(根据指针位置在行的最前面加入标题,不过我考虑了选取文件的场景),但是代码我就先不合并了,因为已经有很大改动了,怕乱掉。

关于自动换行的事,之前也有人提过,但是我觉得如果有好的 Markdown 习惯应该会是自己下意识地先换行,要非常智能是不太可能,只能是相对智能。

@pandao pandao closed this Jun 9, 2015
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