繁体   English   中英

可以在PHP echo中自动完成CSS / Javascript / Jquery?/ HTML的编辑器

[英]Editor that can autocomplete CSS/Javascript/Jquery?/HTML inside a PHP echo

到目前为止,我可以肯定地尝试过Aptana和CofeeCup,它们可以与自动补全功能甚至maby甚至变量一起正常工作,还没有完全尝试过它们,但是我要描述的东西却无法正常工作...

我目前正在NPP(Notepad ++)中工作,并且iv打开了变量autocomplete,但启用该功能后,除非按ctrl +空格键,否则我可以完成函数。 而且我还没有通知任何CSS样式完成。

例:

<?php
    $variable = "My text...";
    echo '<html>        <-- Fixing tags for me.
                <head>
                    <style>
                        body {
                            padding: 0px;       <-- Autocomplete CSS inside the styletags within the
                             echo and maby a popup with options like aptana.
                    </style>
                    <script type="text/javascript">
                            alert("lol");       <-- Autocomplete Javascript inside the scripttag within
                    </script>                   <-- the echo maby even jquery.
                </head>
                <body>'.$variable.'             <-- Autocomplete previously used variable names would be
                     good here, ( like NPP ).
                    <div style="width:100%;height200px;" ></div>   <-- And maby even CSS
                </body>                         <-- Autocomplete on "style" atributes.
        </html>'; 
?>

看看phpstorm

在php外部编写javascript,css代码,然后在php块内部复制/粘贴。 您唯一需要转义的就是引号。 简单。

<? $variable = "My text..."; ?>
<html>
    <head>
        <style>
            body { padding: 0px; }
        </style>
        <script>
            alert("lol");
        </script>
    </head>
    <body>
        <?= $variable ?>
    </body>
</html>
<? /* the end */ ?>

这样的代码-一切都会自动完成。 ob_start +喜欢也可能有帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM