Search.../

onDraftCreated( )

Developer Preview

Triggered when a draft post is created.

Syntax

function wixBlog_onDraftCreated(event: DraftCreated): void

onDraftCreated Parameters

NAME
TYPE
DESCRIPTION
event
Optional
DraftCreated

Returns

This function does not return anything.

Return Type:

void

Was this helpful?

onDraftCreated example

Copy Code
1
2 export function wixBlog_onDraftCreated(event) {
3 const eventId = event.metadata.id
4 const entityId = event.entity._id;
5 }
6
7