Hi,
I'm able to edit existing documents using WYSIWYG editors and REST calls offered by this bundle, but I cannot find any information in documentation about creating new documents.
What is the correct way to do this?
Looking at the bundle source code I see a postDocumentAction in the RestController, which is supposed to be used for creating new documents, but I cannot find any example of using it.
I wonder also if it's possible to use the same twig template both for editing existing documents and creating new ones.
If try to pass a new object to a twig template in the {% createphp %} tag, I get the error: "Document is not managed and has no id".
If I try to pass null, I get the error "The model to create the entity from must be a class".
So, how I can tell CreatePHP that I want to create a new document?
Thank you