Replicating Sketch's Preview window
✓ Published0🌍 Public
KKevinGutowski
Last edited Aug 21, 2019
Created on Aug 21, 2019
This example demonstrates a Sketch plugin that mirrors the application’s Preview window into a floating panel, replicating the live webview content. It uses Sketch’s JavaScript API, including `NSApplication`, `NSPanel`, and `NSThread`, to locate the Preview window, copy its webview configuration, and load the same URL into a new `MSMirrorWebView`. The panel is styled as a floating, closable window without minimize or zoom buttons, and the mirrored webview is added as its only subview. The code does not process data but directly clones an existing UI component.
AI-generated description