Listen to changes
# help-with-umbraco
r
I want to create an SEO checker/preview, with live update. Is it possible to listen to changes in properties in the page from a custom property editor (web component)? https://our.umbraco.com/forum/developers/api-questions/73255-access-and-update-all-other-live-properties-from-custom-property-editor <- how to do this in umbraco 14?
p
I haven't tried this yet (but I'll have to do that for SeoToolkit). I think you are able to consume the UMB_CONTEXT (or some other context) to access the properties of the current content item
UMB_DOCUMENT_WORKSPACE_CONTEXT actually I think
r
Thanx for response! Do you know how to access UMB_Context or UMB_DOCUMENT_WORKSPACE_CONTEXT? I found import { UMB_WORKSPACE_CONTEXT } from '@umbraco-cms/backoffice/workspace'; , but did not find: UMB_DOCUMENT_WORKSPACE_CONTEXT, for example.
p
I guess it depends where you want to get it, but you should be able to use consumeContext(UMB_DOCUMENT_WORKSPACE_CONTEXT) to get it. Example: https://github.com/umbraco/Umbraco.CMS.Backoffice/blob/38373f7ab7e1fe21e1fb4f7bedb6203f7f052660/src/packages/documents/documents/workspace/conditions/is-not-trashed/document-is-not-trashed.condition.ts#L2
r
Huge thanx! Will check that out 🌅
Hi again @Niels Lyngsø , we tried this on Umbraco 15, but did not get properties observable that you mention. (import { UMB_PROPERTY_DATASET_CONTEXT } from '@umbraco-cms/backoffice/property';) Has this changed in the final version, or are we doing something wrong? Can you give a working example?
n
Hi @rstei thanks for following up on this. I see this feature did never make it to the 15.0. But is in 15.1 which is released as an RC already next week. — In general you should be looking forward to 15.1 and 15.2, many bug-fixes and alignments will come in these. https://github.com/umbraco/Umbraco.CMS.Backoffice/pull/2445
4 Views