Open Bug 1399040 Opened 7 years ago Updated 2 years ago

document.execCommand('insertText') for <textarea contenteditable> should support CRLF, CR or LF.

Categories

(Core :: DOM: Editor, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox57 --- affected

People

(Reporter: m_kato, Unassigned)

References

()

Details

Related to bug 1395951. On Windows, data:text/html;charset=utf8, <input type=button onclick="out.focus();document.execCommand('insertText',false,'multi\nline\ntext');console.log(out.innerHTML)" value="Add multi-line string to contentEditable textarea"> <textarea contenteditable id=out></textarea>, doesn't insert new line by \n. But Chrome and Edge insert new line even if Windows.
Priority: -- → P3
Summary: document.execCommand('insertText') should support both CRLF, CR or LF. → document.execCommand('insertText') should support CRLF, CR or LF.
Summary: document.execCommand('insertText') should support CRLF, CR or LF. → document.execCommand('insertText') for <textarea contenteditable> should support CRLF, CR or LF.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.