1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

feat(UI): html, xml, json, svg and yaml editor modes in long text fields edit

This commit is contained in:
2021-02-21 19:22:03 +01:00
parent 110b0b414c
commit 9a1bf32128
6 changed files with 188 additions and 17 deletions

View File

@ -1,7 +1,7 @@
<template>
<div class="editor-wrapper">
<div
ref="editor"
:id="`editor-${id}`"
class="editor"
:style="{height: `${height}px`}"
/>
@ -29,7 +29,8 @@ export default {
return {
editor: null,
fields: [],
baseCompleter: []
baseCompleter: [],
id: null
};
},
computed: {
@ -165,8 +166,11 @@ export default {
}
}
},
created () {
this.id = this._uid;
},
mounted () {
this.editor = ace.edit(this.$refs.editor, {
this.editor = ace.edit(`editor-${this.id}`, {
mode: `ace/mode/${this.mode}`,
theme: `ace/theme/${this.editorTheme}`,
value: this.value,