import { Editor } from '@tinymce/tinymce-react';
// 若干代码
// ...
const text = `
1. major
2. Africa
3. neighbor
4. snacks
5. themes
6. now
7. thousand
8. thought
9. question
10. expression
`;
<Editor
initialValue={text}
/>

- 通过 <pre></pre> 来解决
<Editor initialValue={ `<pre> ${text} </pre>` } onEditorChange={e => { this.valuesChange('text', e); }} />

网友评论