Skip to content

Add direction to plugin method Setting.addItem #11183

Closed
@frostime

Description

@frostime
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

Activity

changed the title [-]Development | 强化 `Setting.addItem` ,允许用户直接指定是否元素独行成块[/-] [+]Development | `Setting.addItem` 允许用户直接指定是否元素独行成块[/+] on Apr 29, 2024
changed the title [-]Development | `Setting.addItem` 允许用户直接指定是否元素独行成块[/-] [+]Add `direction` to plugin method `Setting.addItem`[/+] on Apr 29, 2024
self-assigned this
on Apr 29, 2024
added this to the 3.0.12 milestone on Apr 29, 2024
added a commit that references this issue on Apr 29, 2024
added a commit that references this issue on Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @88250@Vanessa219@frostime

      Issue actions

        Add `direction` to plugin method `Setting.addItem` · Issue #11183 · siyuan-note/siyuan