将组件的设置创建为文本区域/编辑器?

在组件的设置中,我可以通过组件的 settings.yaml 文件轻松创建一个用于输入一段文本的字段……

example_setting:
  default: "<p><i>示例</i>默认值。</p>"
  description:
    en: "This is an example setting."

我查看了 https://github.com/json-editor/json-editor#json-schema-support,但没能从中理解出我想要实现的功能。

我希望这个设置能像下面这样。(来自 House Ads 插件中某个设置的截图。)

如果能提供一个关于如何配置编辑器行为的指针就太好了。

我想这可能就是您要找的。我在 site_settings.yml 中没有看到 textarea: true 的任何示例,但这里有一个主题组件中的示例:

4 个赞

太简单了。 :exclamation: 这效果完美。谢谢 Jay!

1 个赞

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.