问题描述
如何创建一个自动完成功能,以及如何突出显示PHP中的html,javascript和css以供Ace编辑器使用。
< html>
< head>
< title><?= $ title; ?>< /标题>
< style>
body {
background:black;
颜色:白色;
}
< / style>
< script>
alert(这只是一个无意义的测试脚本....);
< / script>
< / head>
< body>
这只是一个无意义的测试脚本,但我希望html标记,css样式和javascript代码都突出显示....< br />
是否有可能?
< / body>
< / html>
(对不起,我的英语)
以下是两个问题。如何创建完成PHP的自动完成器? b $ b
对于第二个问题,在在我看来,如果可能或不可能,最不可能的。查看,尤其是关于嵌入不同的荧光笔部分。
对于自动完成,我没有看到任何机会。有关类似(最近)的问题,请参阅。
How can I create an autocomplete and how to highlight html, javascript and css inside php for the Ace editor http://ace.ajax.org/.
<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>
(sorry for my english)
These are two questions.
How can I create an autocompleter that completes PHP?
How can I syntax highlight HTLM code inside PHP code?
For the second question, there is some discussion in the Google group for Ace Editor In my opinion, the question is not really answered if it is possible or not, but it seems at least doable. Have a look at the documentation for highlighter, especially about the part "Embedding a different highlighter".
For autocompletion, I don't see a chance at all. See the Google group entry about a similar (recent) question.
这篇关于Ace编辑器自动完成和多种语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!