Simple thing. I have some page (node). At end it produces some content, i.e.
<h1>This is original content</h1>
I want to alter it with different content, i.e.
<h1>This is changed content</h1>
So I need a way to collect original content, parse it, replace some part of it and put it back.
hook_ENTITY_TYPE_view() should be the way to do that:
And I tried example from that page (by Devendra Mishra) and it works, but it's adding additional content. I need a way to access original content and change it, not to just add new one.
To be clear, I don't want to change content on field level, but want to change final content, with all fields combined, ready to be rendered.