0

I need to get the full HTML of some news Page externally using CSOM or REST or something else. I know I have to create a CSOM app or something that will have to be register as an app on SPO.

What I cannot find is how to get the full page HTML so I can present it elsewhere. Maybe a simple http Get request. Is this possible?

I know there is a rest API that we can fetch CanvasContent1, but seems messy to parse it correctly and getting all the CSS to work correctly.

1 Answer 1

1

You can fetch the page columns as HTML by using the following GET request:

https://{yoursite}/_api/web/lists/getbytitle('Site%20Pages')/items(1)/FieldValuesAsHtml
2
  • I think OP trying to fetch the full HTML code of news page "content" and not the column values. Commented Jul 21, 2022 at 7:00
  • This should return CanvasContent1, which is the page content. Commented Jul 21, 2022 at 7:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.