# Cómo hacer que parte del texto en un párrafo sea negrita/cursiva/etc. usando funciones de helper.h

**URL:** <https://meta.discourse.org/t/how-to-make-part-of-text-in-a-paragraph-bold-italic-etc-using-helper-h-functions/160106>\
**Category:** UX\
**Created:** [7 Agosto, 2020 07:53 UTC](https://meta.discourse.org/t/how-to-make-part-of-text-in-a-paragraph-bold-italic-etc-using-helper-h-functions/160106 "2020-08-07T07:53:28Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![loginerror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/loginerror/32/156605_2.png) [@loginerror](https://meta.discourse.org/u/loginerror)\
**Post date:** [7 Agosto, 2020 07:53 UTC](https://meta.discourse.org/t/how-to-make-part-of-text-in-a-paragraph-bold-italic-etc-using-helper-h-functions/160106/1 "2020-08-07T07:53:28Z")

</div>

Quizás sea una pregunta sencilla, pero me ha hecho detenerme un momento 😅

¿Cómo lograr esto usando la función `h` de los helpers de Discourse?

```plaintext
<div>
<p>Este texto <i>está en cursiva</i> </p>
</div>

```

Lo más cercano que logré fue esto:

```plaintext
    html() {
      return [ h('div'),
                h('p', "Este texto" + h('i', "está en cursiva"))
             ]
    }

```

Lo cual devuelve esto:  
 ![image](https://global.discourse-cdn.com/meta/original/3X/a/9/a951064500c5569980f256470daccd72bfb00116.png)

De lo contrario, algunas otras variantes que probé devuelven solo `Este texto` o solo `está en cursiva`, pero no ambos 🤔

Por ejemplo, esto:

```plaintext
    html() {
      return [ h('div'),
                h('p', "Este texto", [h('i', "está en cursiva")])
             ]
    }

```

devuelve solo `está en cursiva`  
 ![image](https://global.discourse-cdn.com/meta/original/3X/2/e/2e906346b8e9067240bfea1f0abdd243aaf2b588.png)

¿Casi lo logro?  
Esto:

```plaintext
    html() {
      return [ h('div', ),
                h('p', [h('i', "está en cursiva"), "Este texto"])
             ]
    }

```

Me da esto 😅

![image](https://global.discourse-cdn.com/meta/original/3X/5/f/5ff9f37ad5f970c8c4022469776d6c39e94f29fc.png)

---

_[View the full topic](https://meta.discourse.org/t/how-to-make-part-of-text-in-a-paragraph-bold-italic-etc-using-helper-h-functions/160106)._
