manifest/nuxt/components/EtherpadTextarea.vue

30 lines
676 B
Vue
Raw Normal View History

2023-09-30 20:14:02 +02:00
<script setup="setup">
2024-07-24 14:38:45 +02:00
const nastavitveStore = useNastavitveStore()
const { izbraniJezik } = storeToRefs(nastavitveStore)
2023-09-30 20:14:02 +02:00
const { etherpadUrl, etherpadPrefix } = useRuntimeConfig().public
const jezikPada = computed(() => izbraniJezik.value)
2023-09-30 20:14:02 +02:00
const props = defineProps({
revisionId: String,
onLoad: Function
2023-09-30 20:14:02 +02:00
})
const uuid = props.revisionId ? props.revisionId : crypto.randomUUID()
const padSrc = computed(
() => `${etherpadUrl}/p/${etherpadPrefix}`
+ `${izbraniJezik.value}-${uuid}`
+ '?showChat=false&showLineNumbers=false&toc=false'
)
2023-09-30 20:14:02 +02:00
</script>
<template>
<iframe
class="etherpad-textarea"
@load="props.onLoad"
:src="padSrc" />
2023-09-30 20:14:02 +02:00
</template>