Community
    • Login

    Not showing javascript styles

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    11 Posts 5 Posters 11.5k Views 2 Watching
    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.
    • meiranolickM Offline
      meiranolick
      last edited by

      This is probably considered a minor problem, but it is really bugging me. I updated to the latest version of notepad++ and suddenly it is no longer detecting javascript files correctly and therefore it is retaining the default styles when viewing my .js files. In addition, even when I explicitly choose “Javascript” from the language list, the styles still do not change. Anything I can do to fix it?

      Also, I’ve been happily using notepad++ for all my web development needs for the past three and a half years plus, and plan to continue doing so. Thanks for the help!

      1 Reply Last reply Reply Quote 0
      • Андрей ЧерниковА Offline
        Андрей Черников
        last edited by

        I have a similar problem with javascript files, I don’t care about the styles though, but comment hotkeys stopped working for .js files after some recent update. I found that launching Notepad++ under admin account fixes this issue. This might help you too.

        1 Reply Last reply Reply Quote 0
        • Peter BrandP Offline
          Peter Brand
          last edited by

          It seems to be fixed now in version 6.8.6. What version are you running?

          1 Reply Last reply Reply Quote 0
          • meiranolickM Offline
            meiranolick
            last edited by

            It was specifically with the update to 6.8.6 that the problem started. Is there any more information I might be able to offer to help find the cause of this problem?
            @Андрей Черников I tried running Notepad++ as admin just now, and the problem persisted. Thank you for the idea.

            1 Reply Last reply Reply Quote 0
            • Tatu RissanenT Offline
              Tatu Rissanen
              last edited by

              Open Settings - Style Configurator. If you scroll down the list of languages you will notice there are 2 items for Javascript. The first item styles embedded Javascript (inside <script> element in HTML file) and the last item styles Javascript files.

              1 Reply Last reply Reply Quote 0
              • meiranolickM Offline
                meiranolick
                last edited by

                Thank you very much, that’s exactly what I was looking for! I was able to fix the styles to my liking. Unfortunately, now it’s only adding background to the text on the page, but all whitespace is left with the default white background.

                1 Reply Last reply Reply Quote 0
                • Tatu RissanenT Offline
                  Tatu Rissanen
                  last edited by

                  The whitespace in Javascript files picks up style from Global Styles:

                  • Global override (depending what overrides you have enabled)
                  • Default Style
                  • Current line background (if Preferences - Editing - Enable current line highlighting is checked)
                  meiranolickM 1 Reply Last reply Reply Quote 0
                  • meiranolickM Offline
                    meiranolick @Tatu Rissanen
                    last edited by

                    @Tatu-Rissanen I have the overrides disabled. I can verify that what you say is accurate, but I do not understand this behavior. Up until now, all my files had a default background color of white, and my js files had a different background color. Why is that no longer the case?

                    1 Reply Last reply Reply Quote 0
                    • Tatu RissanenT Offline
                      Tatu Rissanen
                      last edited by

                      I don’t know why.

                      The new Javascript language was added in Notepad++ version 6.8.4. I guess the author wanted the new Javascript DEFAULT style to behave similar to other languages. That is not overwriting the global default style for whitespace and areas after end-of-line or end-of-file.

                      meiranolickM 1 Reply Last reply Reply Quote 0
                      • meiranolickM Offline
                        meiranolick @Tatu Rissanen
                        last edited by

                        @Tatu-Rissanen Ok, thank you very much for your help.

                        1 Reply Last reply Reply Quote 0
                        • Andres CorrealA Offline
                          Andres Correal
                          last edited by

                          I am having this problem with javascript files in 6.8.8. I was fine before just installing. Issue occurs whether in as admin or not. Have to associate each file independently to get it to work. Would rather it recognizes it the .js extension and does it automatically.

                          1 Reply Last reply Reply Quote 0

                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                          With your input, this post could be even better 💗

                          Register Login
                          • First post
                            Last post
                          The Community of users of the Notepad++ text editor.
                          Powered by NodeBB | Contributors