Yes, that's it! Setting prio 4 gives access to the markup.
I'd also like to add a custom "card" at the bottom of the post (like in github-issue plugin). But what happens if I start inserting a html template in this phase? Guess it will mess up markup parsing in a later phase? The plugin.json looks like this:
{
"id": "nodebb-plugin-affiliate",
"name": "Affiliate",
"description": "Earn money on your user generated content. Converts links in posts to affiliate variants (ebay, aliexpress, amazon, banggood, ...). With an optional box showing product image, price and stock availablility.",
"url": "https://github.com/henrikekblad/nodebb-plugin-affiliate",
"library": "./index.js",
"templates": "templates",
"less": [
"less/default.less"
],
"hooks": [
{ "hook": "filter:parse.post", "method": "parse", "priority": 4 },
{ "hook": "filter:parse.raw", "method": "parse", "priority": 4 },
{ "hook": "static:app.load", "method": "init" },
{ "hook": "filter:admin.header.build", "method": "buildMenu" }
],
"staticDirs": {
"static": "./static"
}
}