30 lines
676 B
Vue
30 lines
676 B
Vue
<script setup="setup">
|
|
|
|
const nastavitveStore = useNastavitveStore()
|
|
const { izbraniJezik } = storeToRefs(nastavitveStore)
|
|
|
|
const { etherpadUrl, etherpadPrefix } = useRuntimeConfig().public
|
|
|
|
const jezikPada = computed(() => izbraniJezik.value)
|
|
|
|
const props = defineProps({
|
|
revisionId: String,
|
|
onLoad: Function
|
|
})
|
|
|
|
const uuid = props.revisionId ? props.revisionId : crypto.randomUUID()
|
|
const padSrc = computed(
|
|
() => `${etherpadUrl}/p/${etherpadPrefix}`
|
|
+ `${izbraniJezik.value}-${uuid}`
|
|
+ '?showChat=false&showLineNumbers=false&toc=false'
|
|
)
|
|
|
|
</script>
|
|
|
|
<template>
|
|
<iframe
|
|
class="etherpad-textarea"
|
|
@load="props.onLoad"
|
|
:src="padSrc" />
|
|
</template>
|