Skip to content

#2193 - Add CanvasContentJson to the output#2194

Closed
estruyf wants to merge 1 commit intopnp:mainfrom
estruyf:issue/2193
Closed

#2193 - Add CanvasContentJson to the output#2194
estruyf wants to merge 1 commit intopnp:mainfrom
estruyf:issue/2193

Conversation

@estruyf
Copy link
Copy Markdown
Member

@estruyf estruyf commented Feb 20, 2021

Added CanvasContent1 JSON data to the output of the spo page get command. As we now do the second call to retrieve this data. It is beneficial to also return this data as part of the output (HTML content is already returned). Related to #2193

@waldekmastykarz waldekmastykarz self-assigned this Feb 24, 2021
Copy link
Copy Markdown
Member

@waldekmastykarz waldekmastykarz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done! 👏

.then((res: { CanvasContent1: string } | void) => {
if (res && res.CanvasContent1) {
const canvasData: any[] = JSON.parse(res.CanvasContent1);
pageItemData.CanvasContentJson = res.CanvasContent1;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're no longer using the HTML parsing, we can remove CanvasContent1 from the call on line 43.

@waldekmastykarz
Copy link
Copy Markdown
Member

Merged manually. Thank you! 👏

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants