update icons and add placeholder prop to code interface

This commit is contained in:
Nitwel
2020-09-08 10:09:37 +02:00
parent 1e3e6478f0
commit 9a02a4bab1
6 changed files with 33 additions and 13 deletions

View File

@@ -19,6 +19,7 @@ import 'codemirror/addon/search/matchesonscrollbar.js';
import 'codemirror/addon/scroll/annotatescrollbar.js';
import 'codemirror/addon/lint/lint.js';
import 'codemirror/addon/search/search.js';
import 'codemirror/addon/display/placeholder.js';
import 'codemirror/addon/comment/comment.js';
import 'codemirror/addon/dialog/dialog.js';
@@ -48,6 +49,10 @@ export default defineComponent({
type: Boolean,
default: true,
},
placeholder: {
type: String,
default: null,
},
language: {
type: String,
default: 'text/plain',
@@ -235,6 +240,7 @@ export default defineComponent({
lineNumbers: props.lineNumber,
readOnly: props.disabled ? 'nocursor' : false,
mode: props.language,
placeholder: props.placeholder,
},
props.altOptions ? props.altOptions : {}
);
@@ -296,6 +302,12 @@ export default defineComponent({
text-align: right;
}
::v-deep .CodeMirror {
.CodeMirror-placeholder {
color: var(--foreground-subdued);
}
}
.v-button {
position: absolute;
top: 10px;