Fill fields of type Rich text (Blocks) via REST API

@Siddi, my first bet would be to update your data object to match the shape outlined here e.g.

data: {
  title,
  content: [
     {
      "type": "paragraph",
      "children": [
        {
          "text": "test",
          "type": "text"
        }
      ]
    }
  ]
}

I feel like that should at least save one node inside of the content for the rich-text block editor. The sample response provided should include most, if not all, of the blocks that can be output via the editor currently :thought_balloon:

As @cpres said, it can be tricky to work with as you need to ensure the provided object adheres to the expected shape. If you’re still working on it and run into trouble feel free to drop an update with the issues you’re encountering :raised_hands:

1 Like