如何在渲染之前获取和更改joomla中的文章

Friends, tell me about the issue. Is it possible to receive content in joomla before it is given to the browser.

In article, I want to make a shortcode like this [[1, 2, 3]]. During page rendering I want to get an article, find a shortcode, open it and replace this shortcode with content that will be return by my function. And only then it will retun the content to the browser.