New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Idea - Embedded JavaScript Mode #520
Comments
I'm trying to understand what you did. Looking at the HTML highlight rules (https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/html_highlight_rules.js) it appears to embed the JavaScript mode already. How is what you are doing different? |
The additional rules allow for the following EJS: <h1><%= document.title %></h1>
<% if (something === true) { %>
<div>Something is true!</div>
<% } %> I am using the EJS feature of custom open / close tags which allows me to use the following instead: <h1><?= document.title ?></h1>
<? if (something === true) { ?>
<div>Something is true!</div>
<? } ?> So there would need to be a way to specify custom open / close tags within a mode instance. What would be the best way to add custom options to a specific mode? EJS offers a similar type of syntax to that of PHP, I am not referring to the usual |
Ah sorry, I read EJS, simply as embedded JavaScript (like with script tags), but you meant the specific "templating" language, if you will. |
ejs mode was added in #1445 |
Hello guys,
I have created a new mode for my project called "HTML + EJS" which I believe could be of benefit to others. It is literally an altered version of the HTML mode that utilises the existing JavaScript mode.
Is it possible to add configuration options to a mode? For example, EJS supports custom open and close tags. Is it possible to add a custom open / close tag option for this mode?
If there is interest for this mode I will create a pull request.
Cheers
@Gissues:{"order":30.434782608695958,"status":"backlog"}
The text was updated successfully, but these errors were encountered: