User:Pemaksa/codeScripts
Appearance
let textarea = document.getElementById("textarea");
let div = document.getElementById("div");
textarea.hidden = true;
div.hidden = false;
div.contentEditable = "true";
div.oninput = (e) => {
textarea.value = div.innerHTML;
};
- or
/* Special pages */
.mw-body-content,
let textarea = document.getElementById("textarea");
let mw = document.getElementById("mw");
textarea.hidden = true;
mw.hidden = false;
mw.contentEditable = "true";
mw.oninput = (e) => {
textarea.value = mw.innerHTML;
};