# 使用 api.onToolbarCreate 添加图片标签

**URL:** <https://meta.discourse.org/t/add-image-tag-using-api-ontoolbarcreate/386800>\
**Category:** Development\
**Created:** [2025年十月27日 10:21 UTC](https://meta.discourse.org/t/add-image-tag-using-api-ontoolbarcreate/386800 "2025-10-27T10:21:23Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)\
**Post date:** [2025年十月27日 10:36 UTC](https://meta.discourse.org/t/add-image-tag-using-api-ontoolbarcreate/386800/2 "2025-10-27T10:36:22Z")

</div>

我真傻。我完全错过了上面那行 `I18n.translations[currentLocale].js.composer.image_carousel_placeholder`。  
现在：

```plaintext
I18n.translations[currentLocale].js.composer.image_carousel_placeholder = `\u003cimg src=\"${settings.image_carousel_placeholder}\" height=\"200\" width=\"300\" /\u003e`;

```

这样效果_好_多了。

---

_[View the full topic](https://meta.discourse.org/t/add-image-tag-using-api-ontoolbarcreate/386800)._
