Bold text via API

Hello,

I’m adding a task via API to break lines I can use \n but to bold a text if a put text Asana write the HTML tag and doesn’t bold the text.

Does any now know how can I bold/italic [format text] a text via API? Thank you!

Maybe this thread can help How to get rich text formatting from asana task API - Stack Overflow

I got in touch with Asana Support. Thanks man!

If you can post back your answer here that would be great!

1 Like

The solution is:

Instead of you add the field “notes” replace it to “html_notes” and voilá :smiley: you have HTML in notes.

2 Likes

TIP:
does not work. You have to use \n to break lines

1 Like

TIP: tag < br > does not work *

@Cezar_Ayran how are you using the API? I am attempting to use the html_notes fields through the ruby gem and it appears that the formatting still isn’t getting properly parsed.

03 AM

@Cezar_Ayran just retested with and without the <p> tags… looks like it breaks if you have <p> tags. I’ll have to experiment to see what is and what is not supported.

@markanthonydj This html_notes field does not work perfectly. You should test multiple tags and see which tags work. I got it with < b > and \ n to break line because < br > does not work. I hope Asana can fix it

1 Like

re-reading their post: How to Format Text in Asana • Asana Product Guide, it appears the only html tags that are supported are <b> <i> <u> <ul> <ol>

not sure how to get in tabs and monospace font

its < CODE > </ CODE> for monospace (without spaces)

1 Like

ONE MORE TIP

If you are adding comments in a task via API you also can send the text with HTML just use instead of the field text to html_text

2 Likes