Plugin API: Request for webviewApi.postMessage in the rich text editor

Summary

While webviewApi.postMessage(contentScriptId, message) is available to content scripts running in the markdown preview pane (see the postMessage demo), webviewApi doesn't seem to be available to the same scripts when run in the rich text editor.

Adding webviewApi.postMessage to the rich text editor would make it much easier for plugins like joplin-plugin-freehand-drawing to support the rich text editor.

Details/Context

I'm trying to better support the rich text editor in joplin-plugin-freehand-drawing. Currently, there is no way to edit an existing drawing from the rich text editor.

In the markdown viewer, editing is done by adding a button that, when clicked, calls webviewApi.postMessage(contentScriptId, message)

While I can add an onload listener to images that runs in the rich text editor, webviewApi is undefined in this listener, making it very difficult for the content script to communicate with the main plugin.