Can use some headless editor like Tiptap to customised this UX behaviours. Link: https://tiptap.dev/docs/examples/basics/images