Similar to how we replaced logic in the parser and extracted it into LinkRenderer, we should extract the code that allows us to embed images into something like:
These should take an image, a map, a graph, an iframe etc. and do consistent positional and visual embedding into the parser output, without the code duplication we have right now.
- be content agnostic
- draw the frame if requested
- properly use rightfloat leftfloat and center div wrappers for cases without framing
- add the caption if required
- allow the content to add a class name to the wrapper
- have testcases
This should also simplify any introduction of <figure> etc which we might later want to attempt, aligning with parsoid.