Download html file post content
I want to do this on my website :
- add a button on edit.php page (I succeeded)
- when I click on this button, I want to get the html’s post and download it as html file
I know how to get the html content from the WP REST API with ‘wp-json/v2/posts?include=POSTID’ and my content is in result->content->rendered
But how to download an html file with the content from result->content->rendered please ?
i have no idea how to do