Skip to content

[Feature Request] 添加“内联代码”按钮或者改进现有的“代码块”工具条按钮 #847

Closed
@jiakuan

Description

Prerequisites

  • There isn't an existing issue that requests the same feature, to avoid duplicates.

Clear and concise description of the problem

目前的“代码块”工具条按钮只支持多行的代码块,例如在一句话中,如果我只选择一个词,点击“代码块”工具条按钮,这个被选择的词被转换成一个代码块,但是用户可能只想将选定的词格式成内联代码 (Inline Code)

Suggested solution

有两种方案支持 Inline Code:一种是添加一个新的工具条按钮用来切换内联代码;另一种方式的改进现有的代码块按钮,根据当前选择判断是内联代码还是代码块。

我感觉第二种方案更好。当没有选择文本的时候,将光标所在行转换成代码块;如果有选择的时候,则看选择的文字是否跨多行,只在一行之内的时候,则按照内联代码处理。

Further Information

No response

Contributing

None

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions