mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 23:34:01 +01:00
You can now press CTRL+space to have your shorthand notation completed. 2 options for function and if setup so far. What I've written is a pretty horrible hacky effort to get this working. It does work but needs a LOT of refining.
41 lines
821 B
PHP
41 lines
821 B
PHP
<?php include("lib/settings.php");?>
|
|
<!DOCTYPE html>
|
|
|
|
<html style="margin: 0">
|
|
<head>
|
|
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?> snippet display</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="robots" content="noindex, nofollow">
|
|
<style type="text/css">
|
|
body {background: #fff}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<?php
|
|
$snippets = array(
|
|
array(
|
|
"name" => "Function",
|
|
"replace" => "f ",
|
|
"with" => "function ::var::() {\\n\\t::|::\\n}"
|
|
),
|
|
array(
|
|
"name" => "If",
|
|
"replace" => "if",
|
|
"with" => "if (::|::) {\\n\\t\\n}"
|
|
)
|
|
);
|
|
?>
|
|
|
|
<?php
|
|
for ($i=0;$i<count($snippets);$i++) {
|
|
echo '<div style="cursor: pointer" onClick="top.ICEcoder.doSnippet(\''.$snippets[$i]['replace'].'\',\''.$snippets[$i]['with'].'\')">'.$snippets[$i]['name'].'</div>';
|
|
}
|
|
;?>
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|