diff --git a/nuxt/components/EtherpadTextarea.vue b/nuxt/components/EtherpadTextarea.vue index 7204d03..354e660 100644 --- a/nuxt/components/EtherpadTextarea.vue +++ b/nuxt/components/EtherpadTextarea.vue @@ -5,22 +5,25 @@ const { izbraniJezik } = storeToRefs(nastavitveStore) const { etherpadUrl, etherpadPrefix } = useRuntimeConfig().public +const jezikPada = computed(() => izbraniJezik.value) + 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 -}) +const uuid = props.revisionId ? props.revisionId : crypto.randomUUID() +const padSrc = computed( + () => `${etherpadUrl}/p/${etherpadPrefix}` + + `${izbraniJezik.value}-${uuid}` + + '?showChat=false&showLineNumbers=false&toc=false' +)