File tree 1 file changed +15
-2
lines changed 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -324,10 +324,23 @@ You need to subscribe to a special event in order to know once content has been
324
324
In this repo the subscription is already done in [ onContentSaved.ts] ( src%2Fhelpers%2FonContentSaved.ts )
325
325
326
326
``` ts
327
- epi . subscribe ( " contentSaved" , function ( message : ContentSavedEventArgs ) {
328
- // your code here
327
+ window . addEventListener ( " optimizely:cms: contentSaved" , ( event : any ) => {
328
+ const message = event . detail as ContentSavedEventArgs ;
329
329
});
330
330
```
331
331
332
+ where is defined as following:
333
+
334
+ ``` ts
335
+ interface ContentSavedEventArgs {
336
+ contentLink: string ;
337
+ previewUrl: string ;
338
+ isIndexed: boolean ;
339
+ properties: PropertySaved [];
340
+ parentId? : string ;
341
+ sectionId? : string ;
342
+ }
343
+ ```
344
+
332
345
More details here:
333
346
https://docs.developers.optimizely.com/content-management-system/v1.0.0-CMS-SaaS/docs/enable-live-preview#refresh-the-applications-view-when-content-has-changed
You can’t perform that action at this time.
0 commit comments