27 lines
701 B
Vue
27 lines
701 B
Vue
<script setup="setup">
|
|
|
|
const nastavitveStore = useNastavitveStore()
|
|
const { izbraniJezik } = storeToRefs(nastavitveStore)
|
|
|
|
const { etherpadUrl, etherpadPrefix } = useRuntimeConfig().public
|
|
|
|
const props = defineProps({
|
|
revisionId: String,
|
|
onLoad: Function
|
|
})
|
|
|
|
const embed = ref(null)
|
|
|
|
onMounted(() => {
|
|
// Ce ni revisionId propertyja, se random generira.
|
|
const uuid = props.revisionId ? props.revisionId : crypto.randomUUID()
|
|
const padUrl = `${etherpadUrl}/p/${etherpadPrefix}${izbraniJezik.value}-${uuid}?showChat=false&showLineNumbers=false&toc=false`
|
|
embed.value.src = padUrl
|
|
})
|
|
|
|
</script>
|
|
|
|
<template>
|
|
<iframe ref="embed" class="etherpad-textarea" @load="props.onLoad" />
|
|
</template>
|