Creating a Code only block for use in RTE?

I run GoogleAds on my site as the primary way to generate money and am trying to figure out an easy way to inject them into specific areas of a document created using the RTE (TipTap). I was thinking of making a block called “Ad Block” and not giving it any properties but just have the template use the google code but since blocks are based off element types and they don’t have templates this does not appear to be a solution. I there some built in method I could use to create something that can be selected and inserted into an editor’s chosen spot of an RTE document to fill this need?

Ok so I think I found the solution. Apparently I could do thiswith blocks. I was reading:

and so I think I could just make an element type with no properties and then create a partial view assigned to the block and then insert the block which should just render the partial view in the inserted location and if the view has the Ad Block code in it then it should work as I want?

Can anyone confirm this or let me know if I am on the wrong track?

Hi Matthew :waving_hand:

Yep - that sounds like how I’d approach it too :+1:

You could even have the partial read the actual code from a global setting somewhere on the root, if you think it could be modified at some point?

/Chriztian