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

View File

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