lark icon indicating copy to clipboard operation
lark copied to clipboard

supports to build multi-line rich text

Open Nanyan opened this issue 2 years ago • 3 comments

supports to build multi-line rich text (or say multi-segment rich text in a single post) by using NewLine() method, instead of using \n in a TextTag to start a new line.

See discuss on #42

Nanyan avatar Mar 16 '23 07:03 Nanyan

The new method and function looks good to me. But I have one question. May I ask why we should switch to [][]PostElem? I have no idea about this because it has not been updated so far.

crispgm avatar Mar 17 '23 03:03 crispgm

When NewLine() is called, a new []PostElem will be append to the buf.Content which is type of [][]PostElem, and then when Render() is called, the buf.Content will be directly set to the Content field of the PostBody.

Nanyan avatar Mar 17 '23 09:03 Nanyan

https://open.feishu.cn/document/ukTMukTMukTM/uMDMxEjLzATMx4yMwETM How to use sdk to implement this official multi-line rich text example

marsberrys avatar Sep 04 '23 04:09 marsberrys