Skip to main content

Indent bulleted list via the API

  • October 9, 2024
  • 3 replies
  • 14 views

danielball

Hi. I would like to automatically add a block to a WorkDoc that includes indentation. If I query an indented WorkDoc I get the following:

          {
            "id": "obfuscated",
            "type": "bulleted list",
            "content": "{\\"alignment\\":\\"left\\",\\"direction\\":\\"ltr\\",\\"deltaFormat\\":[{\\"insert\\":\\"Hello3\\"}],\\"indentation\\":2}"
          }

If I mirror the content back using the following GraphQL:

mutation ($doc_id: ID!, $content: JSON!) {
  create_doc_block(type: bulleted_list, doc_id: $doc_id, content: $content) {
    id
  }
}
{
  "content": "{\\"alignment\\":\\"left\\",\\"direction\\":\\"ltr\\",\\"deltaFormat\\":[{\\"insert\\":\\"Hello3\\"}],\\"indentation\\":2}",
  "doc_id": 12345
}

I get the following error:

  "error_data": [
    {
      "error_type": "Unrecognized property",
      "error_msg": "unrecognized property [indentation] in content"
    }
  ],

Why is it that indentation is fine for reading but not for writing. I did look at the Quill playground which seems to suggest I can add an indent value to the attributes object but that seems to get ignored by the API. So… is this possible at all?

3 replies

Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • 3512 replies
  • October 15, 2024

Hello there @danielball,

A fix has been deployed for this 😀

Would you be able to please try it now?

Looking forward to hearing from you!

Cheers,
Matias


danielball
  • Author
  • Participating Frequently
  • 13 replies
  • October 15, 2024

It works! Amazing! Thank you so much!


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • 3512 replies
  • October 16, 2024

I am glad that is the case @danielball !

Happy to help!