This commit is contained in:
2020-04-17 23:09:40 +00:00
parent e9e5228b69
commit 64e89a28cf

View File

@@ -79,20 +79,21 @@
>
</div>
{{ editAreaHeight }}
<v-textarea
dense
:height="editAreaHeight"
ref="editArea"
@input="handleInput"
@dblclick="handleDoubleClick"
v-model="localVal"
></v-textarea>
<div :style="wikiStyle()">
<v-textarea
auto-grow
:height="editAreaHeight"
ref="editArea"
@input="handleInput"
@dblclick="handleDoubleClick"
v-model="localVal"
></v-textarea>
</div>
</v-col>
<!-- WIKI -->
<!-- :style="'height:' + editAreaHeight + ';'" -->
<v-col v-if="showWiki()" :cols="currentView == 1 ? 6 : 12">
<div
style="height:300"
:style="wikiStyle()"
class="aywiki"
v-html="compiledOutput()"
></div>
@@ -138,6 +139,13 @@ export default {
onResize() {
this.editAreaHeight = window.innerHeight / 2;
},
wikiStyle() {
if (this.currentView == SPLIT_VIEW) {
return "height: " + this.editAreaHeight + "px;overflow-y:auto;";
} else {
return false; //false attributes don't get rendered
}
},
getSelectedRange() {
let bodyTextArea = this.$refs.editArea.$el.querySelector("textarea");
this.selection.start = bodyTextArea.selectionStart;