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

Shift+Enter does not work properly in inline elements #11766

Closed
TCOTC opened this issue Jun 19, 2024 · 22 comments
Closed

Shift+Enter does not work properly in inline elements #11766

TCOTC opened this issue Jun 19, 2024 · 22 comments
Assignees
Labels
Milestone

Comments

@TCOTC
Copy link
Contributor

TCOTC commented Jun 19, 2024

块引用前使用 Shift+Enter 异常

正常情况按两下 Shift+Enter 应该是会新建块的,但在块引用前无效:

default.webm
@Vanessa219 Vanessa219 self-assigned this Jun 20, 2024
Vanessa219 added a commit that referenced this issue Jun 20, 2024
@Vanessa219 Vanessa219 added this to the 3.1.0 milestone Jun 20, 2024
@Vanessa219
Copy link
Member

@88250 在块引用内连续 shift+enter 会出现标签

@Vanessa219 Vanessa219 added the Bug label Jun 20, 2024
@88250 88250 changed the title 块引用前使用 Shift+Enter 异常 Shift+Enter does not work properly in inline elements Jun 20, 2024
@88250
Copy link
Member

88250 commented Jun 20, 2024

调整为行级元素内部最多只能加一个 \n

@TCOTC
Copy link
Contributor Author

TCOTC commented Jun 20, 2024

@88250 改动之后还能按两下 Shift+Enter 新建段落块吗?

@88250
Copy link
Member

88250 commented Jun 20, 2024

纯文本行级元素可以,其他行级元素不行,只能有一个换行。

@TCOTC
Copy link
Contributor Author

TCOTC commented Jun 20, 2024

是这个意思吗:

1111111111\n1111111111
2222222**222\n222**2222222

image

@88250
Copy link
Member

88250 commented Jun 20, 2024

是的

@TCOTC
Copy link
Contributor Author

TCOTC commented Jun 20, 2024

@88250 我有个问题,为什么其他行级元素不行?

@Vanessa219
Copy link
Member

需要的话直接回车就行,行级元素处理起来比较复杂。

@TCOTC
Copy link
Contributor Author

TCOTC commented Jun 21, 2024

差别在于:在列表中使用 Shift+Enter 和 Enter 的效果是不同的

行级元素处理起来比较复杂

能处理的话我觉得还是尽量处理,让 Shift+Enter 的行为保持一致

@TCOTC
Copy link
Contributor Author

TCOTC commented Jun 21, 2024

还有这里我觉得可以优化一下:按两次 Shift+Enter 就可以新建一个块了,不应该需要继续输入文本才创建新块

default.webm

@TCOTC
Copy link
Contributor Author

TCOTC commented Jun 23, 2024

@88250 看看上面这条。

还有行级元素能处理的话我觉得还是尽量处理,让 Shift+Enter 的行为保持一致

@88250
Copy link
Member

88250 commented Jun 23, 2024

@Vanessa219 看一下

@Vanessa219
Copy link
Member

行内元素要和段落元素保持一致的话,@88250 这边看看能不能实现?

如果按两次 Shift+Enter 就可以新建一个块了的话,用户就没有办法在一个块下面多次 Shift+Enter 空很多行了。

@TCOTC
Copy link
Contributor Author

TCOTC commented Jun 24, 2024

用户就没有办法在一个块下面多次 Shift+Enter 空很多行了

思源本来就不支持吧

default.webm

@Vanessa219
Copy link
Member

shift+enter 不要输入字符

@TCOTC
Copy link
Contributor Author

TCOTC commented Jun 25, 2024

但是不输入字符的话 Shift+Enter 有啥意义呢

@Vanessa219
Copy link
Member

这个 markdown 规范本来是不支持的,但是有用户需要使用同一个块进行留白,后面才添加的。

@TCOTC
Copy link
Contributor Author

TCOTC commented Jun 27, 2024

我怎么想都感觉怪怪的。现在还能找到那个用户反馈吗?我想看看是个什么需求

@Vanessa219
Copy link
Member

就用来分割,没啥奇怪的。这个太早了,你看看能不能搜到。

@TCOTC
Copy link
Contributor Author

TCOTC commented Jul 3, 2024

@Vanessa219 这样有个问题是,用 Enter 或 Shift+Enter 都无法在列表中直接新建空行,必须先写点东西之后才能在两个块之间按 Enter 新建空行:

default.webm

我建议把这个无限软回车的特性改掉

@Vanessa219
Copy link
Member

这个 markdown 规范本来是不支持的,但是有用户需要使用同一个块进行留白,后面才添加的。

使用这个就可以了,先在 2 后面 shift+enter,然后在 ctrl+shift+a

@TCOTC
Copy link
Contributor Author

TCOTC commented Jul 3, 2024

这个快捷键感觉不是很方便呐

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

No branches or pull requests

3 participants