Not to be pedantic, you don’t need control over MS Word because the source program for a copy/paste and the destination program generally do not talk with one another. Whether Mac or Windows or Linux, the paste operation interacts with the clipboard, not the sending app.
pastedText = e.clipboardData.getData(‘text/html’);
You’re almost certainly doing something like this now, but you’re retrieving the plain text from the clipboard. The trick is that you’d have to retrieve the “rich text” content, and you’d have to convert from HTML to the Markdown subset which Dynalist supports.
It is certainly possible, but it would be non-trivial to implement.
Another possibility, to meet Thiago_Doria’s need, assuming they’re on Windows, would be for them to write an Autohotkey script to paste rich text as Markdown. (If on a Mac, AppleScript could do similar.) Or they could write an Autohotkey script to convert the clipboard from rich text to markdown, and then just paste the converted clipboard with Control-V.
Oooh! Oooh! Here we go. Here’s something Thiago_Doria can use today!
This would work with any rich text source, whether Word, or LibreOffice, or content from a web page. Unfortunately, Markdown is not entirely standardized. It looks like that web page uses single asterisks to wrap italic text, where Dynalist uses double-underscore. (The great thing about standards is that there are so many to choose from! )
For a quick-and-dirty, perhaps someone at Dynalist might clone https://euangoddard.github.io/clipboard2markdown/ and alter it to use Dynalist’s dialect of Markdown.