I am using CodeMirror 6, and in the CSS, I have styled the content element (.cm-content
) with white-space: pre-wrap;
, but it didn’t work. I tried inserting lineWrapping: true
in here:
var editor = new EditorView({
lineWrapping: true,
state,
parent: document.getElementById("editor")
});
But the line wrapping still didn’t work. Has anyone faced this issue, and if so, how do I fix it? What am I missing?