【发布时间】:2018-10-10 15:24:59
【问题描述】:
我有这个字符串:
let s = `
> line1
> line2
> line3
> line4
> — View it on GitLab. You're receiving this e.....
`
当用户点击一个按钮时,我需要在 tinyMCE 中设置它,所以我有这个代码:
tinymce.activeEditor.setContent(s);
问题是我进入了编辑器:
> line1> line2> line3> line4> — View it on GitLab. You're receiving this e.....
如何保留我的纯文本换行符?
【问题讨论】:
标签: javascript tinymce tinymce-4