Skip to main content

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?

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


It works! Amazing! Thank you so much!


I am glad that is the case @danielball !


Happy to help!


Reply