Hello,
this probably may be done with good settings
Very likely.
1. You can configure blocks according to the length of the post:
https://adinserter.pro/documentation/paragraph-settings#counting

2. You should use clearance settings:
https://adinserter.pro/documentation/paragraph-settings#clearance

The basic approach is the following:
Configure paragraph counting to count p (paragraphs) and div (ad inserter blocks) elements: p, div
Then avoid <div or code-block (block class name) in paragraphs above and below.
The actual implementation depends also on the layout of your posts.
Great, thanks a lot for help, I more or less got what I wanted, anyway its much better than it was before. But i cannot achieve certain setting:
https://i.imgur.com/QaiDNXY.png
Theres no enough gap in between, and I know how to fix it, but then ill have to compromise on something else.
Thing is there are only two settings for avoiding, and id need more like 3.
Here are my settings:
https://i.imgur.com/rujgqEY.png
What I want to do is to avoid code-block in 2-3 paragraphss above and below
But also to avoid anything else than paragraph as the first element above AD (so to avoid lists, headings, images, figures, etc)
And thing is that if I set the “avoid above” setting to more than just 1, then unfortunately the plugin will also avoid lists, headings and so on, more than just 1 element above, which may result in long spaces in article that could contain an AD but they dont.
Do you know how to implement what I described?
I see no way to do it. You have pretty complex requirements.
Maybe you should avoid using random paragraph numbers to have more predictable insertion positions.