how change post quick reply component become editor?
ed5bfe2d-fb9a-41f3-8b77-b33ae0c7d0c8-image.png
2c12236d-3bbf-4d3c-8f26-4ffc3490277d-image.png
You can use helpers to make more complicated conditionals. For example:
In your plugin (or theme's library.js):
helpers.appendAdIfSecondPost = function(post) {
return parseInt(post.index, 10) === 2 ? '<strong>Here be an ad</strong>' : '';
};
In your template:
{function.appendAdIfSecondPost}
Here's an old thread explaining how to add helpers to your plugin: https://community.nodebb.org/topic/3554/how-to-create-and-use-a-template-helper
the idea of the templating engine is to keep really complex stuff away from the HTML markup. Otherwise you can have really complicated looking HTML, while it really should just be a JS script.