Thanks, got it, I’ve fixed the warning.
However, I’ve just realized the markdown error is not linked to me wanting to open the composer from my plugin. I’m ashamed I didn’t check earlier, but the problem occurs also when creating a new topic using Discourse UI.
I’m about to report this issue in another topic, so that people landing here are not too confused.
EDIT: here is the new topic.