Input now uses CodeMirror editor

This commit is contained in:
n1474335 2022-06-29 18:02:49 +01:00
parent 54fdc05e3a
commit 85ffe48743
17 changed files with 666 additions and 182 deletions

View file

@ -53,6 +53,9 @@ class OptionsWaiter {
selects[i].selectedIndex = 0;
}
}
// Initialise options
this.setWordWrap();
}
@ -136,14 +139,13 @@ class OptionsWaiter {
* Sets or unsets word wrap on the input and output depending on the wordWrap option value.
*/
setWordWrap() {
document.getElementById("input-text").classList.remove("word-wrap");
this.manager.input.setWordWrap(this.app.options.wordWrap);
document.getElementById("output-text").classList.remove("word-wrap");
document.getElementById("output-html").classList.remove("word-wrap");
document.getElementById("input-highlighter").classList.remove("word-wrap");
document.getElementById("output-highlighter").classList.remove("word-wrap");
if (!this.app.options.wordWrap) {
document.getElementById("input-text").classList.add("word-wrap");
document.getElementById("output-text").classList.add("word-wrap");
document.getElementById("output-html").classList.add("word-wrap");
document.getElementById("input-highlighter").classList.add("word-wrap");