blob: cc44862f7a557eb30a53e977ce007ff15e5be2cb [file] [log] [blame]
<!--
Copyright (C) 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<link rel="import" href="gr-editor-styles.html">
<script src="../bower_components/codemirror-minified/lib/codemirror.js"></script>
<script src="../bower_components/codemirror-minified/addon/edit/closebrackets.js"></script>
<script src="../bower_components/codemirror-minified/addon/edit/closetag.js"></script>
<script src="../bower_components/codemirror-minified/addon/edit/matchtags.js"></script>
<script src="../bower_components/codemirror-minified/addon/edit/trailingspace.js"></script>
<script src="../bower_components/codemirror-minified/addon/fold/foldcode.js" ></script>
<script src="../bower_components/codemirror-minified/addon/fold/foldgutter.js" ></script>
<script src="../bower_components/codemirror-minified/addon/fold/brace-fold.js" ></script>
<script src="../bower_components/codemirror-minified/addon/fold/xml-fold.js" ></script>
<script src="../bower_components/codemirror-minified/addon/fold/markdown-fold.js" ></script>
<script src="../bower_components/codemirror-minified/addon/mode/simple.js"></script>
<script src="../bower_components/codemirror-minified/mode/meta.js"></script>
<script src="../bower_components/codemirror-minified/mode/clike/clike.js" ></script>
<script src="../bower_components/codemirror-minified/mode/clojure/clojure.js" ></script>
<script src="../bower_components/codemirror-minified/mode/css/css.js" ></script>
<script src="../bower_components/codemirror-minified/mode/dart/dart.js" ></script>
<script src="../bower_components/codemirror-minified/mode/dockerfile/dockerfile.js" ></script>
<script src="../bower_components/codemirror-minified/mode/erlang/erlang.js" ></script>
<script src="../bower_components/codemirror-minified/mode/go/go.js" ></script>
<script src="../bower_components/codemirror-minified/mode/haskell/haskell.js" ></script>
<script src="../bower_components/codemirror-minified/mode/htmlembedded/htmlembedded.js" ></script>
<script src="../bower_components/codemirror-minified/mode/htmlmixed/htmlmixed.js" ></script>
<script src="../bower_components/codemirror-minified/mode/javascript/javascript.js" ></script>
<script src="../bower_components/codemirror-minified/mode/markdown/markdown.js" ></script>
<script src="../bower_components/codemirror-minified/mode/php/php.js" ></script>
<script src="../bower_components/codemirror-minified/mode/puppet/puppet.js" ></script>
<script src="../bower_components/codemirror-minified/mode/python/python.js" ></script>
<script src="../bower_components/codemirror-minified/mode/ruby/ruby.js" ></script>
<script src="../bower_components/codemirror-minified/mode/sass/sass.js" ></script>
<script src="../bower_components/codemirror-minified/mode/shell/shell.js" ></script>
<script src="../bower_components/codemirror-minified/mode/soy/soy.js" ></script>
<script src="../bower_components/codemirror-minified/mode/sql/sql.js" ></script>
<script src="../bower_components/codemirror-minified/mode/velocity/velocity.js" ></script>
<script src="../bower_components/codemirror-minified/mode/xml/xml.js" ></script>
<script src="../bower_components/codemirror-minified/mode/yaml/yaml.js" ></script>
<dom-module id="gr-editor">
<template>
<style include="gr-editor-styles">
#wrapper {
height: 100%;
z-index: 0;
}
.CodeMirror {
font-family: 'Roboto Mono', Menlo, 'Lucida Console', Monaco, monospace;
height: auto;
/* CodeMirror has a default z-index of 4. Set to 0 to avoid collisions with fixed header. */
z-index: 0;
}
.CodeMirror-linenumbers {
background-color: #fafafa;
}
.CodeMirror-linenumber {
color: #757575;
}
.cm-tab:before {
color: #757575;
content: "\2192";
position: absolute;
}
.cm-trailingspace {
background-color: #ef9a9a;
border: 1px solid #f44336;
border-radius: 3px;
}
</style>
<div id="wrapper"></div>
</template>
<script src="gr-editor.js"></script>
</dom-module>