How to insert new line 2 times using 'comment.appendText' or 'comment.appendMarkdown'

2 댓글

  • Tipene Hughes
    Zendesk Developer Advocacy

    Hey there!

    This specific problem is related to the way markdown in general treats multiple empty lines. That said, here is one workaround using the   character that should get you the results you're looking for:

    const client = ZAFClient.init();

    client.invoke("comment.appendMarkdown",
    `First Line
     
     
    Third Line`
    );
    0
  • y-shika

    Thanks for commenting this!

    I didn't know the workaround you showed (appendMarkdown +  ), so this workaround is very helpful, thanks!

    Btw, I think we developers expect common newline methods such as appendText + '\n', twice blank space + appendMarkdown, and so on. I hope Zendesk API will be updated in the future to improve the way newlines.

    0

댓글을 남기려면 로그인하세요.

Zendesk 제공