mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 21:36:05 +01:00
create new runOnNoteContentChange event, #3436
This commit is contained in:
@@ -58,6 +58,12 @@ eventService.subscribe([ eventService.ENTITY_CHANGED, eventService.ENTITY_DELETE
|
||||
}
|
||||
});
|
||||
|
||||
eventService.subscribe(eventService.ENTITY_CHANGED, ({entityName, entity}) => {
|
||||
if (entityName === 'note_contents') {
|
||||
runAttachedRelations(entity, 'runOnNoteContentChange', entity);
|
||||
}
|
||||
});
|
||||
|
||||
eventService.subscribe(eventService.ENTITY_CREATED, ({ entityName, entity }) => {
|
||||
if (entityName === 'attributes') {
|
||||
runAttachedRelations(entity.getNote(), 'runOnAttributeCreation', entity);
|
||||
|
||||
Reference in New Issue
Block a user