Gist 4da3ecb32517e64ddc52428cdb30eaab
✓ Published0🌍 Public
KKevinGutowski
Last edited Mar 10, 2021
Created on Mar 10, 2021
This example demonstrates a Sketch plugin that monitors document changes and provides real-time feedback through popup messages. It shows how the plugin reacts to three types of edits: property modifications, object deletions, and object additions or moves. The code uses the Sketch JavaScript API, including `sketch.UI.message` for notifications and `sketch.fromNative` to wrap native objects for access to parent artboards. It logs the full path of each change and distinguishes between moved objects and genuine additions or deletions, with special handling for deletions that are part of a move operation.
AI-generated description