Skip to content

Conversation

@Nanyan
Copy link

@Nanyan Nanyan commented Mar 16, 2023

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

…tead of using \n in a TextTag to start a new line
@crispgm
Copy link
Contributor

crispgm commented Mar 17, 2023

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.

@Nanyan
Copy link
Author

Nanyan commented Mar 17, 2023

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.

@marsberrys
Copy link

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

@crispgm crispgm force-pushed the main branch 2 times, most recently from 1af16ed to 7ae6746 Compare January 10, 2024 09:43
@crispgm crispgm force-pushed the main branch 2 times, most recently from 1e8532a to c231aca Compare May 30, 2025 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants