Bold text via API

formatting

#1

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!


#2

Maybe this thread can help https://stackoverflow.com/questions/26302248/how-to-get-rich-text-formatting-from-asana-task-api


#3

I got in touch with Asana Support. Thanks man!


#4

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


#5

The solution is:

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


#6

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


#7

TIP: tag < br > does not work *


#8

@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


#10

@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.


#11

@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


#12

re-reading their post: https://asana.com/guide/help/fundamentals/text#gl-rich-text, 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


#13

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


#14

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