Document Creation

The document creation lifecycle handles all steps until the document has been created for the first time. Later updates are handled by the document update lifecycle. As you can see, the document import and the document creation by the editor has not exact the same steps and should be considered when handling documents via the import.

Below is a diagram for the document creation lifecycle. You don’t need to fully understand everything going on right now, but as you learn and build more, it will be a useful reference.

Document Creation Lifecycle
  1. For every ContentType you can define defaultContent and defaultMetadata which will be merged with passed content/metadata (passed data are preferred).
  2. content (import) and metadata (import + editor) will be validated in a next step
  3. metadata plugin hook onUpdate will be called
  4. Save the document on the database
  5. Call the server event document.create