distribusi-verse/verse/static/js/editorupdate.js

20 lines
472 B
JavaScript
Raw Normal View History

function update() {
var html = document.getElementById("html");
var css = document.getElementById("css");
var code = document.getElementById("code").contentWindow.document;
document.body.onkeyup = function(){
code.open();
code.writeln(html.value+"<style>"+css.value+"</style>");
code.close();
};
2022-03-04 23:12:47 +01:00
document.addEventListener("DOMContentLoaded", function(){
code.open();
code.writeln(html.value+"<style>"+css.value+"</style>");
code.close();
2022-03-04 23:17:00 +01:00
});
};
update();