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

Should [shortcode] be resolved to an actual value when converting HtmlBodyPart or MarkdownBodyPart is graphql? #16196

Closed
MikeAlhayek opened this issue May 30, 2024 · 3 comments

Comments

@MikeAlhayek
Copy link
Member

When we have shortcodes like [site_name], [image]file1.jpg[/image] or any other shortcode in HtmlBodyPart or MarkdownBodyPart, shouldn't we process the shortcodes and return the raw value?

When we return content using REST API, returning the '[shortcode]` is not as useful as returning the resolved values.

Thoughts?

@Piedone
Copy link
Member

Piedone commented May 30, 2024

I don't think we should return this processed content where we return the source currently, but we can have new fields to produce it. Kind of like rendered.

@MikeAlhayek
Copy link
Member Author

I agree with you. render property for these two parts is a good choice to allow us to be able to render both versions of the part.

@MikeAlhayek
Copy link
Member Author

After looking more at the code, it turn out that we already process the HTML and markdown part/field from shortcodes. This is a false alarm.

return await shortcodeService.ProcessAsync(html,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants