Suppose I am writing a plugin that needs to fetch some data via webviewApi.postMessage. Very much like joplin/markdownItTestPlugin.ts at dev · laurent22/joplin · GitHub but this one sends a message on button click, I want to do it when the note is rendered. Is there any way to achive this?
I've tried setting document.onload but that didn't work for me (though I'm not an expert on JS, might have done something wrong).
Just one thing that i noted a moment ago - style tag must but closed with matching </style> - if its self enclosed - like <style /> it will break the rendering of note.
So example code should be <style onload="${postMessageWithResponseTest.replace(/\n/g, ' ')}"></style>
not <style onload="${postMessageWithResponseTest.replace(/\n/g, ' ')}"/>