v-craft icon indicating copy to clipboard operation
v-craft copied to clipboard

Great project, have a few questions

Open jay2success opened this issue 4 years ago • 3 comments

Hi,

Thanks for great project, i have few questions:

  1. 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>

  1. 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 }

  1. 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.

  2. Its great project, just missing few important things like events, toolbar, and rules.

Thanks for your help.

jay2success avatar Feb 15 '21 03:02 jay2success

hi,

Thanks for your asking.

  1. 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.
  2. Could you provide more information to reproduce it, like using CodeSanbox.
  3. Sorry, there are no such events in the current version of v-craft. Thanks for your suggestion, I also think this feature is useful.

yoychen avatar May 09 '21 08:05 yoychen

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-

  1. 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.
  2. 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?
  3. 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.

Nehasoni988 avatar Nov 30 '22 05:11 Nehasoni988

Hello. Is this compatible with vue 3?

jermsam avatar Apr 03 '23 15:04 jermsam