1

I'm using HTML parser in Ace Editor. I'm looking for a way to add a set of custom tags and set a colour for them.

Tags look like this: {%HEADER%}, {%CONTENT%}, {%FOOTER%}.

Example code:

<html>
    <body>
        <h1>{%HEADER%}<h1>
        {%CONTENT%}
    </body>
</html>

Is there any way of doing this?

1 Answer 1

1

You need to create a new highlight mode for ace. See https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/handlebars_highlight_rules.js for somewhat similar highlighter and http://ace.c9.io/#nav=higlighter for docs

Sign up to request clarification or add additional context in comments.

1 Comment

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.