2019-04-28 19:11:57 -05:00
|
|
|
<template>
|
2021-11-18 08:32:43 -06:00
|
|
|
<!-- eslint-disable vue/no-mutating-props -->
|
2021-11-19 04:36:12 -06:00
|
|
|
<XContainer :draggable="true" @remove="() => $emit('remove')">
|
2021-04-20 09:22:59 -05:00
|
|
|
<template #header><i class="fas fa-align-left"></i> {{ $ts._pages.blocks.text }}</template>
|
2019-04-28 19:11:57 -05:00
|
|
|
|
2020-04-12 13:23:23 -05:00
|
|
|
<section class="vckmsadr">
|
2022-12-23 20:57:06 -06:00
|
|
|
<textarea v-model="text"></textarea>
|
2019-04-28 19:11:57 -05:00
|
|
|
</section>
|
2020-10-17 06:12:00 -05:00
|
|
|
</XContainer>
|
2019-04-28 19:11:57 -05:00
|
|
|
</template>
|
|
|
|
|
2022-06-18 04:39:04 -05:00
|
|
|
<script lang="ts" setup>
|
2021-11-18 08:32:43 -06:00
|
|
|
/* eslint-disable vue/no-mutating-props */
|
2022-12-23 20:57:06 -06:00
|
|
|
import { watch } from 'vue';
|
2019-04-29 16:40:02 -05:00
|
|
|
import XContainer from '../page-editor.container.vue';
|
2019-04-28 19:11:57 -05:00
|
|
|
|
2022-12-23 20:57:06 -06:00
|
|
|
const props = defineProps<{
|
|
|
|
modelValue: any
|
|
|
|
}>();
|
|
|
|
|
|
|
|
const emit = defineEmits<{
|
|
|
|
(ev: 'update:modelValue', value: any): void;
|
|
|
|
}>();
|
|
|
|
|
|
|
|
const text = $ref(props.modelValue.text ?? '');
|
|
|
|
|
|
|
|
watch($$(text), () => {
|
|
|
|
emit('update:modelValue', {
|
|
|
|
...props.modelValue,
|
|
|
|
text,
|
|
|
|
});
|
2019-04-28 19:11:57 -05:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2022-12-27 03:01:06 -06:00
|
|
|
<style lang="scss">
|
2020-04-12 13:23:23 -05:00
|
|
|
.vckmsadr {
|
2020-01-29 13:37:25 -06:00
|
|
|
> textarea {
|
|
|
|
display: block;
|
|
|
|
-webkit-appearance: none;
|
|
|
|
-moz-appearance: none;
|
|
|
|
appearance: none;
|
|
|
|
width: 100%;
|
|
|
|
min-width: 100%;
|
|
|
|
min-height: 150px;
|
|
|
|
border: none;
|
|
|
|
box-shadow: none;
|
|
|
|
padding: 16px;
|
|
|
|
background: transparent;
|
|
|
|
color: var(--fg);
|
|
|
|
font-size: 14px;
|
2020-04-12 13:23:23 -05:00
|
|
|
box-sizing: border-box;
|
2020-01-29 13:37:25 -06:00
|
|
|
}
|
|
|
|
}
|
2019-04-28 19:11:57 -05:00
|
|
|
</style>
|