Line 59: | Line 59: | ||
qs(".JC #content-body").oninput = function(){ | qs(".JC #content-body").oninput = function(){ | ||
qs('textarea').value = "<div>" + qs('.JC #content-body').innerHTML+"<\/div><html><script>window.location='/Team:Judd_UK/" + page.replace("*", "/") + "'<\/script><\/html>"; | qs('textarea').value = "<div>" + qs('.JC #content-body').innerHTML+"<\/div><html><script>window.location='/Team:Judd_UK/" + page.replace("*", "/") + "'<\/script><\/html>"; | ||
− | |||
− | |||
− | |||
− | |||
qsa("img").forEach(function(e){e.oncontextmenu = function(o){o.target.classList.toggle("left");o.preventDefault()}}); | qsa("img").forEach(function(e){e.oncontextmenu = function(o){o.target.classList.toggle("left");o.preventDefault()}}); | ||
}; | }; | ||
Line 77: | Line 73: | ||
qs('.editHelp').style.display = "none"; | qs('.editHelp').style.display = "none"; | ||
qsa("label")[1].innerHTML="Editing " + safety; | qsa("label")[1].innerHTML="Editing " + safety; | ||
+ | qs("textarea").oninput = function(){ | ||
+ | qs('.JC #content-body').innerHTML = qs('textarea').value; | ||
+ | qsa("img").forEach(function(e){e.oncontextmenu = function(o){o.target.classList.toggle("left");o.preventDefault()}}); | ||
+ | }; | ||
}) | }) | ||
} | } |
Revision as of 00:00, 29 October 2017