How to add custom content via hook in the element

I used the bricks/frontend/before_render_data filter and added the custom content in the Product Related element. Content is perfectly shown at the frontend. But I am not getting that same content in the Product Related element when I am opening the builder editor. How shall I get the same frontend preview at the Builder editor? Is there any hook for the builder editor?

I posted the complete details here Need hooks for the Native elements