<input style="width: 3rem;" class="join-item input input-xs input-bordered btn-square" :data-index="index" v-model.lazy="family.score" @change="edited" placeholder="family.score">
<button class="btn btn-xs join-item pr-2" @click="removeFamily">X</button>
</div>
- <div v-if="ready" :style="familyStyle" contenteditable="true" @input="customSampleText">
- {{ familyPangram }}
- </div>
+ <div style="white-space: pre-wrap;" v-if="ready" :style="familyStyle" contenteditable="true" @input="customSampleText">{{ familyPangram }}</div>
<div v-else>
Loading...
</div>
methods: {
customSampleText(event) {
this.$root.sampleText = event.target.innerText;
+ console.log(this.$root.sampleText);
},
edited() {
this.$emit('edited', this.family);
computed: {
familyPangram() {
if (this.$root.sampleText !== "") {
- return this.$root.sampleText;
+ return this.$root.sampleText
}
return this.$root.familyPangram(this.family);
},