I'm new to working with the REST API, and I can't seem to wrap my head around this issue.
I have several static pages that I created using the Elementor page builder. Since I am trying to integrate a continuous music player the site I'm working on, I want to replace the content of a page with the content of a different page whenever I click a link in the menu. All pages share a header and footer that is already rendered when I open the page in the first place, so I thought I could suffice by replacing the content with the content of the page belonging to the link I clicked.
my-site.domain/wp-json/wp/v2/pages/pageid. When I try this in my browser, the rendered content in the json object is correct, but incomplete. It displays all the content and its html tags, but none of the Elementor classes. When I load the page normally, the first part of the content starts with a bunch of elementor rows, containers, widgets, etc, that position and style the content. The first actual content is this:
<h1 class="elementor-heading-title elementor-size-default"> TITLE </h1>
However, when I make an api call, the rendered content has none of the Elementor divs or classes or styling and shows up as follows:
<h1> TITLE </h1>