codemirror.php
1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
$p = strip_tags($_GET["pagina"]);
if($_GET["nopage"] != "sim"){
include ($p);
echo "
<script>
i3GEO.janela.cria(
'950px',
'390px',
'codemirror.php?pagina={$p}&nopage=sim',
'',
'',
'Código',
'codigoPagina',
false,
'hd',
function(){},
function(){
i3GEO.janela.minimiza('codigoPagina');
}
);
</script>
";
exit;
}
?>
<!doctype html>
<head>
<title>CodeMirror: HTML completion demo</title>
<meta charset="utf-8" />
<link rel=stylesheet href="../pacotes/codemirror/doc/docs.css">
<link rel="stylesheet" href="../pacotes/codemirror/lib/codemirror.css">
<link rel="stylesheet" href="../pacotes/codemirror/addon/hint/show-hint.css">
<script src="../pacotes/codemirror/lib/codemirror.js"></script>
<script src="../pacotes/codemirror/addon/hint/show-hint.js"></script>
<script src="../pacotes/codemirror/addon/hint/xml-hint.js"></script>
<script src="../pacotes/codemirror/addon/hint/html-hint.js"></script>
<script src="../pacotes/codemirror/mode/xml/xml.js"></script>
<script src="../pacotes/codemirror/mode/javascript/javascript.js"></script>
<script src="../pacotes/codemirror/mode/css/css.js"></script>
<script src="../pacotes/codemirror/mode/htmlmixed/htmlmixed.js"></script>
<style type="text/css">
.CodeMirror {
border-top: 1px solid #888;
border-bottom: 1px solid #888;
}
</style>
</head>
<body>
<textarea id="codeArea" style="text-align: left; width: 90%; height: 95%">
<?php include ($p); ?>
</textarea>
<script>
CodeMirror.fromTextArea(document.getElementById("codeArea"), {
mode: "text/html",
lineNumbers: true
});
</script>
</body>