I have created a span which acts as a placeholder for figcaption
. I am trying to center the placeholder but it is creating some padding(not sure) which I cannot control.
Here is the link for code sandbox.
sanbox
I have tried commenting out property width:0
which indeed centered the caption but the focus is misbehaving now.
This is the react component for span which acts as placeholder
<span
contentEditable={false}
style={{
pointerEvents: "none",
display: "inline-block",
width: "0",
maxWidth: "100%",
whiteSpace: "nowrap",
opacity: "0.333"
}}
>
Figure Caption
</span>
To reproduce the bug, please open the sandbox, place your cursor inside editor, and click on insert image
button. As soon as you click it an image with caption gets inserted. Placeholder inside it is not centered.