Image upload example question


2,upload a image

I find a <br> label after image label. Is this deliberately designed?

It will cause the cursor position to be incorrect.

Original contenteditable:



sorry ,I found this seems to be a chrome problem. Safari is Ok

The <br> tag seems to only be there when the image is the last element in the paragraph (it works around another browser issue), and doesn’t seem to related to the cursor problem.

I’ve noticed this too, but it appears to be a Chrome bug that’s not directly related to that example—if you put the cursor directly after an image that’s higher than the text, it gets aligned to the top of the image. It appears to be possible to work around this by wrapping the image in a <span> and adding a zero-width space after it, but I’m hesitant about putting such an ugly hack into the default schema definition.