3 <title>CodeMirror: Html Embedded Scripts mode
</title>
4 <meta charset=
"utf-8"/>
5 <link rel=stylesheet
href=
"../../doc/docs.css">
7 <link rel=
"stylesheet" href=
"../../lib/codemirror.css">
8 <script src=
"../../lib/codemirror.js"></script>
9 <script src=
"../xml/xml.js"></script>
10 <script src=
"../javascript/javascript.js"></script>
11 <script src=
"../css/css.js"></script>
12 <script src=
"../htmlmixed/htmlmixed.js"></script>
13 <script src=
"htmlembedded.js"></script>
14 <style type=
"text/css">.CodeMirror {border-top:
1px solid black; border-bottom:
1px solid black;}
</style>
16 <a href=
"http://codemirror.net"><img id=logo
src=
"../../doc/logo.png"></a>
19 <li><a href=
"../../index.html">Home
</a>
20 <li><a href=
"../../doc/manual.html">Manual
</a>
21 <li><a href=
"https://github.com/marijnh/codemirror">Code
</a>
24 <li><a href=
"../index.html">Language modes
</a>
25 <li><a class=active
href=
"#">Html Embedded Scripts
</a>
30 <h2>Html Embedded Scripts mode
</h2>
31 <form><textarea id=
"code" name=
"code">
34 return
"Hello " + who;
37 This is an example of EJS (embedded javascript)
38 <p>The program says <%= hello(
"world") %
>.
</p>
40 alert(
"And here is some normal JS code"); // also colored
45 var editor = CodeMirror.fromTextArea(document.getElementById(
"code"), {
47 mode:
"application/x-ejs",
53 <p>Mode for html embedded scripts like JSP and ASP.NET. Depends on HtmlMixed which in turn depends on
54 JavaScript, CSS and XML.
<br />Other dependancies include those of the scriping language chosen.
</p>
56 <p><strong>MIME types defined:
</strong> <code>application/x-aspx
</code> (ASP.NET),
57 <code>application/x-ejs
</code> (Embedded Javascript),
<code>application/x-jsp
</code> (JavaServer Pages)
</p>