• Login
Community
  • Login

CSS and Javascript in HTML files

Scheduled Pinned Locked Moved General Discussion
3 Posts 3 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.
  • T
    Tolki Rum
    last edited by Tolki Rum Jul 10, 2020, 7:05 AM Jul 10, 2020, 7:03 AM

    Hello,
    I get no colourising in the style and script sections of my html files. Some commands in Javascript are italic, and strings between quotation marks are grey, but this is way less convenient than the colourising I get if I select “Javascript” as the main language, which isn’t practical at all as I am working on a html file. For CSS, I don’t get any styling at all.
    I don’t understand why people on forums and online courses don’t have this problem, as I updated the software to the latest version.
    Anyone knows a way around this problem?

    alt text

    E 1 Reply Last reply Jul 10, 2020, 12:48 PM Reply Quote 0
    • E
      Ekopalypse @Tolki Rum
      last edited by Ekopalypse Jul 10, 2020, 12:49 PM Jul 10, 2020, 12:48 PM

      @Tolki-Rum

      Afaik html lexer does not contain an css lexer, hence you don’t get
      css colored within html document. Switching between the two
      languages seems to be one way, another would be to contribute to
      scintilla and rewrite the html lexer to support css lexing as well,
      other solutions involve creating plugins …

      Concerning the other issue, if you updated from an very old version to
      a more recent one it might be that you have to delete/rename
      langs.xml and let it recreate on npp startup.

      1 Reply Last reply Reply Quote 3
      • A
        ArkadiuszMichalski
        last edited by Sep 24, 2020, 11:13 AM

        https://sourceforge.net/p/scintilla/bugs/341/ << waiting for this since 2005:)

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