Quantcast
Viewing all articles
Browse latest Browse all 3663

Wix REST API: Create a draft post using html directly in content

When using the WIX Rest API to create a draft post I am sending the following in the request:

post_params = {    draftPost : {        memberId: member_id,        title: 'My New Post',        richContent: {            nodes: [{                type: "HTML",                id: "",                nodes: [],                htmlData: {                    containerData: {},                    source: "HTML",                    html: html_content                }            }],        }    },    published:false,};

This will embed my html in a data container in the blog post rather than implement the html directly (as other platforms like WordPress or Shopify do when posting a blog with their API).

Image may be NSFW.
Clik here to view.
enter image description here

Is there a way to implement my HTML directly when creating a draft post via the Wix REST API? Or a way to implement rich text directly? The docs describe many different nodes that one can utilize but I don't see any that allow me to simply implement my existing html directly into a draft blog. Am I missing something?


Viewing all articles
Browse latest Browse all 3663

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>