Multi-user form editing #452
-
I have forms that several users could edit similtaniously. @adamberecz do you have any suggestions how could I implement highlighting, with user name possible, on each element that is focussed now by other user? Might you have other suggestions or improvments? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
For one, here's how you can track the selected element: <script setup>
import { ref, onMounted, watch, computed } from 'vue';
const builder$ = ref();
const selectedElement = computed(() => {
return builder$.value?.selectedElement;
});
watch(selectedElement, alert);
</script>
<template>
<div id="app" class="h-screen">
<VueformBuilder ref="builder$" />
</div>
</template> I am trying to think of ways you can reliably add class + DOM to an element's layout externally, but I couldn't so far. Overriding the Syncing can probably be managed, but I would expect pitfalls along the way. The builder was not made with live collaboration capabilities in mind, so probably tweaking the source would be needed in multiple places. I am moving this to builder repo, because it's more related to that. |
Beta Was this translation helpful? Give feedback.
For one, here's how you can track the selected element:
I am trying to think of ways you can reliably add class + DOM to an element's layout externally, but I couldn't so far. Overriding the
ElementLayout
's template for different element types is how the builder adds those remove/clone/etc actions, name tag and so on and that would be the most straightforward way. …