1

I'm using Ace Editor, and I'm trying to figure out how to get it to live syntax check the HTML markup AND JavaScript code in the editor.

If I set "ace/mode/html" only HTML syntax is checked, so in the following code

<!DOCTYPE HTML>
<html>
    <head>
        <title>Test</title>
    </head>
    <body>
        <h1>Hello World!</h1>
        <script>
            alert('This is a syntax error'+);
        </script>
    </body>
</html>

the JS syntax error is ignored by the editor.

Is there a way to tell to Ace Editor to check both HTML and Javascript?

Thank you very much!

THIS IS NOT A DUPLICATE OF How do I enable Live Syntax Checking in the Ace Editor

The question above explains how to execute syntax check HTML and JS in 2 separate editors, while I'm asking how to check them in the same one.

Community
  • 1
  • 1
Erich
  • 15
  • 4
  • @R My question is not a duplicate of http://stackoverflow.com/questions/21995198 The question above explains how to execute syntax check HTML and JS in 2 separate editors, while I'm asking how to check them in the same one. – Erich Dec 18 '16 at 10:33

1 Answers1

1

You can use htmlhint, which has ace example running on thelanding page http://htmlhint.com/

a user
  • 23,300
  • 6
  • 58
  • 90