contentEditable - Firefox
tag

前端 未结 3 1627
臣服心动
臣服心动 2020-12-17 19:10

Firefox inserts a
tag on press enter whereas the other browsers are adding either a

or

. I know that
3条回答
  •  执笔经年
    2020-12-17 20:00

    If you change the contenteditable element to be a instead of a

    the new line will be made with a
    . I haven't tested this with other elements, but it would be interesting to see how different elements would behave.

    A element can be styled with display: block to make it look like a

    element.

提交回复
热议问题