I just needed to pass the `windowId` to all the formatting notifications. Now it works correctly across multiple window instances.
Besides fixing the bug, I implemented a new feature that allows pasting text without formatting by calling `NSTextView.pasteAsPlainText` using shortcut `Cmd+Shift+V`.
**Next bug to fix:** When I paste some text with formatting (using normal `Cmd+V`), the text is black with a small font-size. Then once I move my cursor over the text view, the text suddenly gets the correct styling - so it seems like the text view is re-rendering.