v-craft
v-craft copied to clipboard
Great project, have a few questions
Hi,
Thanks for great project, i have few questions:
- how to show toolbar when item selected? i checked the source code and it seems no event to attach when node is selected. I try to do the following, maybe there is better way?
<div> <div v-show="isSelected"> <div id="toolbar-options" class="hidden"> <a href="#" ><i class="fa fa-plane"></i></a> <a href="#" ><i class="fa fa-car"></i></a> <a href="#" ><i class="fa fa-bicycle"></i></a> </div> </div> <Editor></Editor> </div>
- How to set rules when the node is droppable into some node? I try to use canMoveIn but its not working
rules: { canMoveIn: (node) => node.parent.componentName == 'Row' //only allow inside Row }
-
Is there event when node being dropped so we can do something, example show popup to enter some value. In my case i want to drop Column element but i want user to enter how many columns they want. Then use that value as props for the Column element.
-
Its great project, just missing few important things like events, toolbar, and rules.
Thanks for your help.
hi,
Thanks for your asking.
- In the current version of v-craft, when a node is selected, it will have the class name
cf-node-selected
. You can use this class name to determine if the node is selected.isSelected
props is a great solution. Thanks for the suggestion. - Could you provide more information to reproduce it, like using CodeSanbox.
- Sorry, there are no such events in the current version of v-craft. Thanks for your suggestion, I also think this feature is useful.
Hello,
It's indeed a great project but I also have a few questions according to my requirement. I want to create a newspaper builder on my website. A newspaper builder format would be exactly as it is displayed in this demo.
My questions are-
- Do I need to create the structure like this demo by myself after installing the v-craft? Because I read in the documentation that after installing the v-craft, we need to create the builder by ourselves using v-craft's features.
- I have seen that export data is a JSON of the Vue data structure. If I want to download this builder in a PDF or JPG, would it be possible by that?
- I also saw an issue in this demo once we remove all elements and the canvas is empty then a new element can not be added.
It would be great if you can answer these questions.
Hello. Is this compatible with vue 3?