mirror of
https://github.com/gooba42/adventureland.git
synced 2026-10-14 18:39:27 -05:00
49 lines
2.0 KiB
HTML
49 lines
2.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src="/js/jquery/jquery-{{domain.jquery_version}}.min.js"></script>
|
|
<script src="/js/codemirror/{{domain.cm_version}}/codemirror.js"></script>
|
|
<link href="/js/codemirror/{{domain.cm_version}}/codemirror.css" rel="stylesheet" type="text/css"/>
|
|
<link href="/js/codemirror/{{domain.cm_version}}/material.css" rel="stylesheet" type="text/css"/>
|
|
<script src="/js/codemirror/{{domain.cm_version}}/css.js"></script>
|
|
<script src="/js/codemirror/{{domain.cm_version}}/javascript.js"></script>
|
|
<script src="/js/codemirror/{{domain.cm_version}}/xml.js"></script>
|
|
<script src="/js/codemirror/{{domain.cm_version}}/htmlmixed.js"></script>
|
|
<script src="/js/tests/msgpack.min.js?v={{domain.v}}"></script><script src="/js/tests/pako.min.js"></script>
|
|
<script src="/js/common_functions.js?v={{domain.v}}"></script>
|
|
<script src="/js/functions.js?v={{domain.v}}"></script>
|
|
<link href="/css/common.css?v={{domain.v}}" rel="stylesheet" type="text/css"/>
|
|
<style>
|
|
#render{
|
|
width: 100%;
|
|
height: 500px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<textarea id="render"></textarea>
|
|
<button onclick="a_render()">Render!</button><button onclick="r_render()">RunnerRender!</button><button onclick="$('#runner').html('<iframe src=\'/runner\' height=\'50\' width=\'100\' id=\'r1\'></iframe>')">Insert Runner</button>
|
|
<div id="renderoutput" style="margin-top: 5px"></div>
|
|
<div id="runner"></div>
|
|
<script>
|
|
var codemirror_render = CodeMirror(function(current){$("#render").replaceWith(current);},{
|
|
value:"<div></div>\n<style></style>\n<script>\n\ttry{\n\t\t\n\t}catch(e){alert(e)}\n\<\/script>",
|
|
mode:"htmlmixed",
|
|
indentUnit:4,
|
|
indentWithTabs:true,
|
|
theme:"material",
|
|
/*,lineNumbers:true*/
|
|
});
|
|
function a_render()
|
|
{
|
|
var html=codemirror_render.getValue();
|
|
$("#renderoutput").html(html);
|
|
}
|
|
function r_render()
|
|
{
|
|
var html=codemirror_render.getValue();
|
|
document.getElementById("r1").contentWindow.render(html);
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |