Add custom markdown quote bbcode tags

I tested that out, and it did indeed allow me to add [sb] around the text, unfortunately it was just the text that is on the element. I would like it to quote the original text instead, as that contains everything to recreate block.

I’m currently trying to see if I can have the actual svg not be selectable, and just have a hidden selectable element with the original source underneath the svg.

I’m achieving this by creating a container that contains 2 elements, the svg, and the source. I’m trying to have the svg have position: relative so it can be out of the flow and on top of the source text, as well as having the container the same size as the svg to make it look like the svg is still inside the text. Also, the source text would have opacity: 0 and be a very small size so that it’s invisible in case it may overflow the svg.

I’m wondering if there’s an easier way to do this, because the way I’m trying to do it would require rebaking all the posts, and it also feels like a hacky solution to something I feel shouldn’t require doing this.

Edit: after looking at the code for the addTagDecorateCallback() function, it looks like I can return text in the callback to replace whatever text it would’ve used. That’s actually going to help so much more, since I hopefully won’t have to deal with my hacky system that I was working on that works terribly.