# 如何在自定义文本中添加FontAwesome图标

**URL:** https://meta.discourse.org/t/how-to-add-fontawesome-icon-in-custom-text/42460
**Category:** Support
**Created:** [2016年四月12日 16:48 UTC](https://meta.discourse.org/t/how-to-add-fontawesome-icon-in-custom-text/42460 "2016-04-12T16:48:26Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [2016年四月12日 16:48 UTC](https://meta.discourse.org/t/how-to-add-fontawesome-icon-in-custom-text/42460/1 "2016-04-12T16:48:26Z")

</div>

Okay, so I’m trying to add the following verbiage to `education.new-reply`, but it doesn’t work.

```plaintext
Welcome to %{site_name} &mdash; **thanks for contributing!**

- Does your reply improve the conversation in some way? **If you want to show approval for a post, please click the <i class="fa fa-heart"></i> button.**

- Be kind to your fellow community members.

- Constructive criticism is welcome, but criticize *ideas*, not people.

For more, [see our community guidelines](/guidelines). This panel will only appear for your first %{education_posts_text}.

```

The additional verbiage is the

```plaintext
**If you want to show approval for a post, please click the <i class="fa fa-heart"></i> button.**

```

When attempted, it shows up as (stripping out the FontAwesome details)

 ![](https://global.discourse-cdn.com/meta/original/3X/0/3/03244493dbcb98cadbc30d7c15c6a87742c4045a.png)

What would be the appropriate way to do this, as the FontAwesome code works for `js.composer.error.try_like` which contains

```plaintext
Have you tried the <i class="fa fa-heart"></i> button?

```

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [2016年四月12日 19:06 UTC](https://meta.discourse.org/t/how-to-add-fontawesome-icon-in-custom-text/42460/2 "2016-04-12T19:06:12Z")

</div>

Instead of the icon, would the emoji work OK?

`Have you tried the :heart: button?`

\* of course, even if that does work, I’d still be interested to know how to do the icons

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [2016年四月12日 19:09 UTC](https://meta.discourse.org/t/how-to-add-fontawesome-icon-in-custom-text/42460/3 "2016-04-12T19:09:45Z")

</div>

Wow, I never thought of using that, but it works! Awesome 🙂

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2016年四月12日 21:36 UTC](https://meta.discourse.org/t/how-to-add-fontawesome-icon-in-custom-text/42460/4 "2016-04-12T21:36:23Z")

</div>

All good, but remember all TL0 and TL1 users will see this when they try to compose a post which is too short:

[https://pbs.twimg.com/tweet\_video/CfElUWyUsAEXJvG.mp4](https://pbs.twimg.com/tweet_video/CfElUWyUsAEXJvG.mp4)

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [2016年四月12日 23:12 UTC](https://meta.discourse.org/t/how-to-add-fontawesome-icon-in-custom-text/42460/5 "2016-04-12T23:12:33Z")

</div>

> [@codinghorror](#):
>
> All good, but remember all TL0 and TL1 users will see this when they try to compose a post which is too short:

Yes, that problem we’re still sorting out. As our minimum post length is way too low, and increasing it is one of my suggestions to ensure new users also get that.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2016年四月12日 23:17 UTC](https://meta.discourse.org/t/how-to-add-fontawesome-icon-in-custom-text/42460/6 "2016-04-12T23:17:11Z")

</div>

Well yeah, minimum reply length is set to 20 by default for a reason. 😉

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [2016年四月12日 23:20 UTC](https://meta.discourse.org/t/how-to-add-fontawesome-icon-in-custom-text/42460/7 "2016-04-12T23:20:57Z")

</div>

Oh trust me, I know. Wasn’t my decision to shorten it in the first place 😉

Thankfully hindsight is 20/20 and all that jazz 😃

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2024年六月8日 12:45 UTC](https://meta.discourse.org/t/how-to-add-fontawesome-icon-in-custom-text/42460/8 "2024-06-08T12:45:45Z")

</div>

此主题已在 2978 天后自动关闭。不再允许回复。
