Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

supports to build multi-line rich text #43

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

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

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.

None yet

3 participants