如何创建一个自动完成,以及如何在php中突出显示Ace编辑器http://ace.ajax.org/的html、javascript和css。
<html>
<head>
<title><?=$title; ?></title>
<style>
body {
background: black;
color: white;
}
</style>
<script>
alert("this is only a no-sense test script....");
</script>
</head>
<body>
This is only a no-sense test script but I want that html tags, css styles and javascript code are highlighted....<br />
Is it possible?
</body>
</html>
(对不起我的英语)
最佳答案
这是两个问题。
如何创建完成PHP的自动完成程序?
如何在PHP代码中语法突出显示HTLM代码?
对于第二个问题,在我看来,Google group for Ace Editor中有一些讨论,如果可能的话,这个问题并没有得到真正的回答,但至少看起来是可行的。看看documentation for highlighter,特别是关于“嵌入不同的荧光笔”的部分。
对于自动完成,我一点机会都没有。请参阅关于类似(最近)问题的Google group entry。