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

Add direction to plugin method Setting.addItem #11183

Closed
frostime opened this issue Apr 29, 2024 · 0 comments
Closed

Add direction to plugin method Setting.addItem #11183

frostime opened this issue Apr 29, 2024 · 0 comments
Assignees
Milestone

Comments

@frostime
Copy link
Contributor

In what scenarios do you need this feature?

@Vanessa219

目前插件 API 的 setting 对象,在 addItem 的时候,如果是 textarea 就会自动独立成块。

image

这种独立成块的布局非常常用,不光是 textarea 有用,有时候需要进行复杂布局的时候也会用上。

Describe the optimal solution

增加标识,让开发者指定是否 actionElement 是否要按照和 textarea 一样的行为独立成块。几种方案:

  1. addItem 添加一个参数
  2. 读取 actionElement 上特定的标识,例如特定的 className 等

Describe the candidate solution

No response

Other information

No response

@frostime frostime changed the title Development | 强化 Setting.addItem ,允许用户直接指定是否元素独行成块 Development | Setting.addItem 允许用户直接指定是否元素独行成块 Apr 29, 2024
@Vanessa219 Vanessa219 changed the title Development | Setting.addItem 允许用户直接指定是否元素独行成块 Add direction to plugin method Setting.addItem Apr 29, 2024
@Vanessa219 Vanessa219 self-assigned this Apr 29, 2024
@Vanessa219 Vanessa219 added this to the 3.0.12 milestone Apr 29, 2024
Vanessa219 added a commit to siyuan-note/petal that referenced this issue Apr 29, 2024
Vanessa219 added a commit to siyuan-note/plugin-sample that referenced this issue Apr 29, 2024
Vanessa219 added a commit that referenced this issue Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants