• Login
Community
  • Login

How to display CSS style on a PHP page?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 4 Posters 1.3k 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.
  • J
    Jonathan Nich
    last edited by Jun 23, 2020, 5:24 PM

    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.

    E P 2 Replies Last reply Jun 24, 2020, 7:04 AM Reply Quote 0
    • E
      Ekopalypse @Jonathan Nich
      last edited by Jun 24, 2020, 7:04 AM

      @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
      • A
        andrecool-68
        last edited by Jun 24, 2020, 5:32 PM

        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
        • P
          PeterJones @Jonathan Nich
          last edited by PeterJones Jun 24, 2020, 5:47 PM Jun 24, 2020, 5:47 PM

          @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
          4 out of 4
          • First post
            4/4
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors