Get the context of a copied element via electron clipboard


I am about to create a new task manager with Electron where one of my main feature is to be able to capture task

Let me explain what it would look like:

The main element is a text input to write the “to-do”/task. This input can be repopulated if a text is selected while using the keyboard shortcut. In addition, of that a URI can be associated to task if the context of the selected text can be captured. This context can be for example :

  • a Gmail link to an email
  • the link to a slack conversation
  • the internal link to an email on Apple Mail
  • a web page
  • etc

I am pretty sure I can use the Electron clipboard API to copy the selected text, but I did not find a way for now to get the “context”.

According to you, do you think it’s possible? Any ideas?

I would appreciate :innocent: