Make HTMLEditor::InsertElementAtSelectionAsAction
split ancestor inline elements
Chrome and Safari splits ancestors when document.execCommand("insertImage")
inserts an <img>
, but we insert into the closest inline element. For example,
<b>A[]B</b>
Chrome and Safari make it to:
<b>A</b><img><b>B</b>
But Firefox makes it to:
<b>A<img>B</b>
I think that we should not change the behavior on Thunderbird. Therefore, the
behavior is controlled with the new options
argument and the new behavior
runs only when the HTMLEditor
works for content document and it's not caused
by the XPCOM method.
Differential Revision: https://phabricator.services.mozilla.com/D225037
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1923250
gecko-commit: 4d82c0995e5d5653017d08b4c101f078a165039c
gecko-reviewers: m_kato