doudao9915 2011-10-29 12:46
浏览 271
已采纳

Ace Editor自动完成和多种语言

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)

  • 写回答

4条回答 默认 最新

  • duanbi3151 2011-10-29 14:18
    关注

    These are two questions.

    1. How can I create an autocompleter that completes PHP?

    2. 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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器