Community
    • Login

    How to display CSS style on a PHP page?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 4 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Jonathan NichJ
      Jonathan Nich
      last edited by

      Hi.

      I have a PHP page that’s full of CSS and I’m wanting to open the PHP page, yet have the style be CSS so I can read the CSS easily.

      How to do this?

      Thanks.

      EkopalypseE PeterJonesP 2 Replies Last reply Reply Quote 0
      • EkopalypseE
        Ekopalypse @Jonathan Nich
        last edited by

        @Jonathan-Nich

        To my knowledge, there is no lexer that contains PHP and CSS.
        What you can try is something I have posted here.
        But I don’t know if this is sufficient in your case.

        1 Reply Last reply Reply Quote 1
        • andrecool-68A
          andrecool-68
          last edited by

          In such cases, I constantly switch the language syntax, and to make it more convenient, I duplicated it in the context menu

          Безымянный.png

          1 Reply Last reply Reply Quote 2
          • PeterJonesP
            PeterJones @Jonathan Nich
            last edited by PeterJones

            @Jonathan-Nich ,

            If you want to use @andrecool-68’s suggestion of adding the lexers to the context menu: in case it wasn’t clear, the arrow wasn’t meant to indicate that opening the Languages menu will give the popup in the screenshot – rather, he modified his right-click ContextMenu to include a Syntax Language folder which allows changing to his favorite list of languges. See this discussion, where we delve more deeply into how @andrecool-68 made that folder in the context menu. To make the edits, you will use Settings > Edit Popup ContextMenu to change the settings in contextMenu.xml. See the contextMenu docs here for more on the syntax.

            Alternately, you could set up a script similar to the ones described in this other thread. The post I linked contains a script which toggles between XML and HTML, which could be quickly adapted to work with CSS and PHP. Throughout the thread, there are also examples of using a macro to just set the language instead of toggling, and other similar concepts.

            1 Reply Last reply Reply Quote 3
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors